Repository navigation
Conversation
93472b1 to
cb3701f
Compare
…on for css sourcemaps Instead, use `convertToAbsoluteUrls: true`. See <https://github.com/webpack-contrib/style-loader#converttoabsoluteurls>.
cb3701f to
39631bf
Compare
clydin
left a comment
There was a problem hiding this comment.
This also requires a style-loader version of at least 0.14.
Note also that the real fix for this would be the style-loader PR webpack/style-loader#219 which uses a more modern method to inline the stylesheets.
| @@ -39,7 +39,7 @@ export function getStylesConfig(wco: WebpackConfigOptions) { | |||
| // style-loader does not support sourcemaps without absolute publicPath, so it's | |||
There was a problem hiding this comment.
If this completely fixes the issue, then this comment should be removed.
| use: buildOptions.extractCss ? ExtractTextPlugin.extract(extractTextPlugin) : [{ | ||
| loader: 'style-loader', | ||
| options: { | ||
| convertToAbsoluteUrls: cssSourceMap, |
There was a problem hiding this comment.
This should not be needed. From looking at this code, the option is automatically enabled if the stylesheet has a source map and the setting is undefined.
|
@clydin Great! It's truly a more graceful solution. Feel free to close this PR please. |
|
This should provide a working solution until that PR is merged. With the changes mentioned above, the improvements from that PR (once merged and released) should automatically apply with no changes necessary on this end. |
|
Superseded by #8883 |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Don't specify the extract-css option as precondition for css sourcemaps, Instead, use
convertToAbsoluteUrls: true.See https://github.com/webpack-contrib/style-loader#converttoabsoluteurls.
P.S.
My english is not so good, feel free to edit the commit message. Thank you.