File tree 1 file changed +7
-3
lines changed
packages/@angular/cli/models/webpack-configs
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ export function getStylesConfig(wco: WebpackConfigOptions) {
39
39
// style-loader does not support sourcemaps without absolute publicPath, so it's
40
40
// better to disable them when not extracting css
41
41
// https://github.com/webpack-contrib/style-loader#recommended-configuration
42
- const cssSourceMap = buildOptions . extractCss && buildOptions . sourcemaps ;
42
+ const cssSourceMap = buildOptions . sourcemaps ;
43
43
44
44
// Minify/optimize css in production.
45
45
const minimizeCss = buildOptions . target === 'production' ;
@@ -199,8 +199,12 @@ export function getStylesConfig(wco: WebpackConfigOptions) {
199
199
const ret : any = {
200
200
include : globalStylePaths ,
201
201
test,
202
- use : buildOptions . extractCss ? ExtractTextPlugin . extract ( extractTextPlugin )
203
- : [ 'style-loader' , ...extractTextPlugin . use ]
202
+ use : buildOptions . extractCss ? ExtractTextPlugin . extract ( extractTextPlugin ) : [ {
203
+ loader : 'style-loader' ,
204
+ options : {
205
+ convertToAbsoluteUrls : cssSourceMap ,
206
+ } ,
207
+ } , ...extractTextPlugin . use ] ,
204
208
} ;
205
209
// Save the original options as arguments for eject.
206
210
if ( buildOptions . extractCss ) {
You can’t perform that action at this time.
0 commit comments