Closed
Description
🐞 Bug report
Command (mark with an x
)
- new
- build
- serve
- test
- e2e
- generate
- add
- update
- lint
- extract-i18n
- run
- config
- help
- version
- doc
Is this a regression?
I don't believe so, but I'm not for sure on that.
Description
When building with angular.json
=> { sourcemaps: true, optimization: true }
(more specifically optimization.styles.minify: true
), CSS sourcemap comments in main.*.js
point to a non-existent *.component.css.map
file:
/*sourceMappingURL=footer.component.css.map*/
The corresponding footer.component.css.map
file is not created by the build.
Here is an example of an example app containing a FooterComponent built with four different optimization
build settings in angular.json
(but sourcemaps turned on in all four cases):
No footer.component.css.map
file is ever created. When the app source code is viewed in Chrome Dev Tools, it tries and fails to load the non-existant CSS sourcemaps.
🔬 Minimal Reproduction
Build using angular.json
:
{
"sourcemaps": true,
"optimization": true
}
🌍 Your Environment
Angular CLI: 13.2.6
Node: 16.14.0
Package Manager: npm 8.3.1
OS: win32 x64
Angular: 13.2.6
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, language-service, material, platform-browser
... platform-browser-dynamic, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1302.6
@angular-devkit/build-angular 13.2.6
@angular-devkit/core 13.2.6
@angular-devkit/schematics 13.2.6
@schematics/angular 13.2.6
rxjs 7.5.5
typescript 4.5.5