Closed
Description
Details
Wrong SourceMap genrated
Reproduction (Code)
// webpack.config.js
...
entry : {
test: './src/test.css',
}
plugins: [
new webpack.SourceMapDevToolPlugin({
filename: '[file].map',
noSources: true,
moduleFilenameTemplate: '[resource-path]'
}
],
module: {
rules: [
{
test: /\.css$/,
use: [
MiniCssExtractPlugin.loader,
{
loader: 'css-loader',
options: {
sourceMap: true
}
},
Conf.cases(Conf.prod, {
loader: 'postcss-loader',
options: {
plugins: [
autoprefixer,
cssnano
],
sourceMap: true
}
})
]
}
]
}
...
body {
margin: 0;
}
generated sourcemap has wrong path test.css
instead of ./src/test.css
{"version":3,"sources":["test.css"],"names":[],"mappings":"AAAA,KACI,QACJ,C","file":"test.css","sourceRoot":""}
Environment
OS | node | npm/yarn | package |
---|---|---|---|
Ubuntu20.04.1 LTS | 13.14.0 | 6.14.4 | 3.0.0 |
Metadata
Metadata
Assignees
Labels
No labels