Repository navigation
fix(@angular/build): ensure @angular/compiler is loaded for Vitest TestBed initialization - #34202
Conversation
ff9ce8c to
31b4ad1
Compare
There was a problem hiding this comment.
Code Review
This pull request adds an initialization step for the Angular compiler (@angular/compiler) in the Vitest unit test runner by registering a new virtual file and entry point (init-compiler.js) that imports @angular/compiler and prepends it to the Vitest setup files. Additionally, a new integration test has been added to verify that providers injecting services requiring JIT compilation function correctly. No review comments were provided, so there is no feedback to address.
…stBed initialization Provide a dedicated setup file to import '@angular/compiler' prior to TestBed initialization. This ensures the compiler facade is published before 'init-testbed.js' or any shared code-split chunks (such as those configured via 'providersFile') are evaluated, avoiding JIT compilation errors when injectable dependencies are resolved during test initialization.
31b4ad1 to
6aa8648
Compare
|
This pull request has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Provide a dedicated setup file to import '@angular/compiler' prior to TestBed initialization. This ensures the compiler facade is published before 'init-testbed.js' or any shared code-split chunks (such as those configured via 'providersFile') are evaluated, avoiding JIT compilation errors when injectable dependencies are resolved during test initialization.
Closes #31993