-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Closed
Labels
Description
I'm submitting a bug report
Webpack version:
2.1.0-beta.4
Please tell us about your environment:
OSX 10.x
Current behavior:
Source map is not generated when new webpack.optimize.UglifyJsPlugin() is used.
If I remove UglifyJSPlugin or use webpack version 1.13, it does produce source map.
Expected/desired behavior:
Source map should be generated.
- My config
const path = require('path');
const webpack = require('webpack');
const WebpackNotifierPlugin = require('webpack-notifier');
const styleLintPlugin = require('stylelint-webpack-plugin');
const env = process.env.NODE_ENV;
module.exports = {
devtool: 'source-map',
entry: './src',
output: {
path: path.join(__dirname, 'dist'),
filename: 'app.js',
},
plugins: [
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify('production'),
},
}),
new webpack.optimize.DedupePlugin(),
new webpack.optimize.UglifyJsPlugin()
],
module: {
loaders: [
{ test: /\.js$/, exclude: /node_modules/, loader: 'babel' },
{ test: /\.js$/, exclude: /node_modules/, loader: 'eslint' },
{ test: /\.css$/, exclude: /node_modules/, loader: 'style!css?modules&importLoaders=1&localIdentName=[local]_[hash:base64:5]' },
],
},
};
- Language: [ES6/7]
Reactions are currently unavailable