Answer the question
In order to leave comments, you need to log in
How to make minified build with webpack and es2015?
There are actually two questions:
1. Why if you write like this:
module: {
loaders: [{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel',
query: {
presets: ['es2015']
}
}]
}
loaders: [{
test: /\.js$/,
loader: 'babel-loader'
}]
{
"presets": ["es2015"]
}
module: {
loaders: [{
test: /\.js$/,
loader: 'babel-loader'
}]
}
if(NODE_ENV === 'prod') {
module.exports.plugins.push(new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false,
drop_console: true
}
}))
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question