We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d1b0448 commit b3b4546Copy full SHA for b3b4546
packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/styles.ts
@@ -193,7 +193,13 @@ export function getStylesConfig(wco: WebpackConfigOptions) {
193
options: {
194
ident: 'embedded',
195
plugins: postcssPluginCreator,
196
- sourceMap: cssSourceMap && !buildOptions.sourceMap.hidden ? 'inline' : false,
+ 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,
203
},
204
205
...(use as webpack.Loader[]),
0 commit comments