Closed
Description
-
Operating System:
OSX 10.14.6 (18G95) -
Node Version:
v10.16.0 -
NPM Version:
yarn 1.21.1 -
webpack Version:
4.41.5 -
css-loader Version:
3.4.1
Expected Behavior
Sources field of the sourcemap contains the path relative to the context. e.g. "sources":["src/foo/index.css"]
Actual Behavior
Sources field of the sourcemap contains just the file name. e.g. "sources":["index.css"]
Code
// webpack.config.js
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const path = require('path');
module.exports = {
entry: './src/foo/index.css',
devtool: 'source-map',
module: {
rules: [
{
test: /\.css$/,
use: [
MiniCssExtractPlugin.loader,
'css-loader?sourceMap',
]
}
]
},
plugins: [new MiniCssExtractPlugin()],
};
How Do We Reproduce?
- Create a webpack project with the above configuration.
yarn webpack
cat dist/main.css.map
Note, the sources field is "sources":["webpack:///index.css"]
Metadata
Metadata
Assignees
Labels
No labels