Description
Command
serve
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
The define build option is not passed on for prebundling https://github.com/angular/angular-cli/blob/main/packages/angular/build/src/tools/vite/utils.ts#L101 and so library code that relies on a global variable being set cannot be prebundled.
Minimal Reproduction
Pre-bundle a library that relies on a global.
Exception or Error
Your Environment
Angular CLI: 19.0.6
Node: 20.12.1
Package Manager: npm 10.5.0
OS: darwin arm64
Angular: 19.0.5
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1900.6
@angular-devkit/build-angular 19.0.6
@angular-devkit/core 19.0.6
@angular-devkit/schematics 19.0.6
@angular/cli 19.0.6
@schematics/angular 19.0.6
rxjs 7.8.1
typescript 5.6.3
zone.js 0.15.0
Anything else relevant?
No response