You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3dd7aa1
Browse filesBrowse the repository at this point in the historyBrowse files
fix(@angular/build): re-enable code splitting for unit tests
Re-enables esbuild code splitting for unit test builds by removing
`disableCodeSplitting` and resolving the underlying live export binding
issue when chunks are loaded by Vitest under Zone.js (#33728):
1. Ensures test spec files are treated as ES modules by appending
`export {};` in the Angular compiler plugin if absent. In Zone.js
applications, downleveled `async` functions capture module-level `this`
via `__async(this, ...)`. Without an explicit export, esbuild misclassified
spec files as CommonJS and wrapped them in `__commonJS`, which led to lazy
`__esm` initializers for shared dependencies.
2. In the Vitest in-memory provider plugin, eagerly invokes any lazy `__esm`
initializers detected in chunks when loaded for `vite-node`. Because
`vite-node` statically captures exports upon initial chunk evaluation,
eagerly executing the initializers ensures exported values are populated
before consumers read them.
3. Enforces `namedChunks: false` for unit test builds to ensure chunks
consistently match chunk naming patterns.
closes#33948 and closes#33938
0 commit comments