From 6e4c8c7b9030142767fa1f7992b0d71ec50a8a05 Mon Sep 17 00:00:00 2001 From: afc163 Date: Wed, 10 Jun 2015 16:23:05 +0800 Subject: [PATCH] sourcemap config --- webpack.config.js | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index 5753125b99..678b17950e 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -24,14 +24,25 @@ module.exports = { loaders: [ {test: /\.jsx?$/, loader: 'babel'}, {test: /\.json$/, loader: 'json-loader'}, - {test: /\.less$/, loader: ExtractTextPlugin.extract("style-loader", "css-loader!less-loader")}, - {test: /\.css/, loader: ExtractTextPlugin.extract("style-loader", "css-loader")} + { + test: /\.less$/, + loader: ExtractTextPlugin.extract( + 'css?sourceMap!' + + 'less?sourceMap' + ) + }, + { + test: /\.css$/, + loader: ExtractTextPlugin.extract( + 'css?sourceMap' + ) + } ] }, plugins: [ - new ExtractTextPlugin("[name].css") + new ExtractTextPlugin('[name].css') ], - devtool: "#source-map" + devtool: '#source-map' }; -- GitLab