Skip to content

Commit c66f831

Browse files
ajsperavikerman
authored andcommitted
fix(@angular-devkit/build-angular): load style source maps inline so they work (#11729)
without this, the way styles are into the DOM breaks the default sourcemap option postcss-loader option docs https://github.com/postcss/postcss-loader#inline fixes #9099
1 parent 0535e2b commit c66f831

File tree

1 file changed

+2
-2
lines changed
  • packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs

1 file changed

+2
-2
lines changed

packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/styles.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ export function getStylesConfig(wco: WebpackConfigOptions) {
258258
options: {
259259
ident: 'embedded',
260260
plugins: postcssPluginCreator,
261-
sourceMap: cssSourceMap
261+
sourceMap: cssSourceMap ? 'inline' : false
262262
}
263263
},
264264
...(use as webpack.Loader[])
@@ -281,7 +281,7 @@ export function getStylesConfig(wco: WebpackConfigOptions) {
281281
options: {
282282
ident: buildOptions.extractCss ? 'extracted' : 'embedded',
283283
plugins: postcssPluginCreator,
284-
sourceMap: cssSourceMap
284+
sourceMap: cssSourceMap && !buildOptions.extractCss ? 'inline' : cssSourceMap
285285
}
286286
},
287287
...(use as webpack.Loader[])

0 commit comments

Comments
 (0)