-
Notifications
You must be signed in to change notification settings - Fork 26.7k
build: add a dev-app #64875
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
build: add a dev-app #64875
Conversation
| "karma-chrome-launcher": "3.2.0", | ||
| "karma-coverage": "2.2.1", | ||
| "karma-jasmine": "5.1.0", | ||
| "karma-jasmine-html-reporter": "2.1.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we go with vitest from the start ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just forked this off of the adev setup. I can try to get it to work with vitest, but not sure if we have support for that in our current bazel setup (or if I know what I'm doing enough to get it working)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this new application, I'd suggest avoiding Karma. Setting up Vitest with JSDOM should be relatively straightforward as it's already done for new application.
Honestly, I think it might have been better to generate a fresh app using the Angular CLI and then add the Bazel bits, rather than copying the 'adev' setup, which now needs to be cleaned up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I pushed a new commit where I just based it on a fresh ng new app. I can run it, but there's still a few problems:
- vscode shows red squiggles for the import from
@angular/core"Cannot find module '@angular/core' or its corresponding type declarations.ts(2307)" (resulting in everything beinganytype - tests don't build, something is looking for karma (I'm probably using the wrong bazel rule)
- couldn't get SSR to work so I just generated an app without it (failed to build due to some type errors)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to that a look and push if that's fine for you, for vitest it's the same ng_test rules but you do need to have the karma depedencies installed regardless for now. (Requires a cleanup in the build rule).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok, I had a similar issue with zone.js where it was required for one of the build rules even though it was unused. I got the tests building now at least, but they fail to run because they can't find tsconfig.app.json. @angular/core still shows up with red squiggles too (but not other packages like @angular/router for some reason). Feel free to take a look and push up commits if that's easier.
db5a0e4 to
ea1439b
Compare
Adds a dev app that can be used to prototype and debug things while developing Angular. Use `pnpm dev` to run it.
start with a fresh `ng new` app
Adds a dev app that can be used to prototype and debug things while developing Angular. Use
pnpm devto run it.