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) {
193
193
options : {
194
194
ident : 'embedded' ,
195
195
plugins : postcssPluginCreator ,
196
- sourceMap : cssSourceMap && ! buildOptions . sourceMap . hidden ? 'inline' : false ,
196
+ sourceMap : cssSourceMap
197
+ // Never use component css sourcemap when optimizations are on.
198
+ // It will just increase bundle size without offering good debug experience.
199
+ && ! buildOptions . optimization
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 ,
197
203
} ,
198
204
} ,
199
205
...( use as webpack . Loader [ ] ) ,
You can’t perform that action at this time.
0 commit comments