File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -193,7 +193,13 @@ export function getStylesConfig(wco: WebpackConfigOptions) {
193193 options : {
194194 ident : 'embedded' ,
195195 plugins : postcssPluginCreator ,
196- sourceMap : cssSourceMap && ! buildOptions . sourceMap . hidden ? 'inline' : false ,
196+ sourceMap : cssSourceMap
197+ // Never use component css sourcemap when style optimizations are on.
198+ // It will just increase bundle size without offering good debug experience.
199+ && ! buildOptions . optimization . styles
200+ // Inline all sourcemap types except hidden ones, which are the same as no sourcemaps
201+ // for component css.
202+ && ! buildOptions . sourceMap . hidden ? 'inline' : false ,
197203 } ,
198204 } ,
199205 ...( use as webpack . Loader [ ] ) ,
You can’t perform that action at this time.
0 commit comments