-
-
Notifications
You must be signed in to change notification settings - Fork 387
Closed
Description
I am importing a css file in my app entry.js. I want to prevent the sourceMapUrl from appearing on the extracted css file. I've tried passing sourceMap : false
to both css-loader and mini-css-extract-plugin, but it still generates the sourceMappingURL.
Here are the relevant snippets of my config
new MiniCssExtractPlugin({
filename: isDev
? '../static/stylesheets/core.css'
: '../static/stylesheets/core.[contenthash].css'
})
rules: [
{
test: /\.css$/,
use: [
{
loader: MiniCssExtractPlugin.loader,
options: {
sourceMap: false
}
},
{
loader: 'css-loader',
options: {
url: false,
sourceMap: false
}
}
]
Expected output:
No sourceMapUrl in the extracted css file.
Actual output:
/*# sourceMappingURL=../../../../entry.map*/
Version info:
webpack : 4.16.3
css-loader : 0.28.11
mini-css-extract-plugin : 0.4.1
Any help is appreciated. Thanks!
leourbina, sejoker and hundunlong