Skip to content

Conversation

@mmalerba
Copy link
Contributor

@mmalerba mmalerba commented Nov 3, 2025

Adds a dev app that can be used to prototype and debug things while developing Angular. Use pnpm dev to run it.

@mmalerba mmalerba added the target: rc This PR is targeted for the next release-candidate label Nov 3, 2025
@angular-robot angular-robot bot added the area: build & ci Related the build and CI infrastructure of the project label Nov 3, 2025
@ngbot ngbot bot added this to the Backlog milestone Nov 3, 2025
@JeanMeche JeanMeche added target: minor This PR is targeted for the next minor release and removed target: rc This PR is targeted for the next release-candidate labels Nov 3, 2025
Comment on lines +21 to +42
"karma-chrome-launcher": "3.2.0",
"karma-coverage": "2.2.1",
"karma-jasmine": "5.1.0",
"karma-jasmine-html-reporter": "2.1.0",
Copy link
Member

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 ?

Copy link
Contributor Author

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)

Copy link
Contributor

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

Copy link
Contributor Author

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 being any type
  • 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)

Copy link
Contributor

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).

Copy link
Contributor Author

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.

@mmalerba mmalerba force-pushed the dev-app branch 4 times, most recently from db5a0e4 to ea1439b Compare November 4, 2025 21:56
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: build & ci Related the build and CI infrastructure of the project target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants