Skip to content

Commit f2f4876

Browse files
committed
Add source map test
1 parent 2513a25 commit f2f4876

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

tests/app.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
require('./app.css');
2+
require('./other.css');
23

34
console.log('Hello!');

tests/other.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
a {
2+
color: blue;
3+
}

tests/webpack.config.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@ var plugins = [
2525
}),
2626
new ExtractTextPlugin('[name].css', { allChunks: true }),
2727
new OptimizeCssAssetsPlugin({
28-
cssProcessorOptions: { discardComments: {removeAll: true }, zindex: false},
28+
cssProcessorOptions: { discardComments: {removeAll: true }, zindex: false, map: { inline: false } },
2929
})
3030
];
3131

3232
module.exports = {
33+
devtool: "source-map",
3334
context: projectPath + '/',
3435
entry: entry,
3536
output: {
@@ -39,7 +40,7 @@ module.exports = {
3940
module: {
4041
loaders: [{
4142
test: /\.css$/,
42-
loader: ExtractTextPlugin.extract('css-loader?&discardDuplicates&discardComments'),
43+
loader: ExtractTextPlugin.extract('css-loader?&discardDuplicates&discardComments&sourceMap'),
4344
},{
4445
test: /\.png$/,
4546
loader: 'file-loader'

0 commit comments

Comments
 (0)