2020-03-13 21:35:35 -04:00
|
|
|
const webpack = require('webpack');
|
2020-02-06 12:27:58 -05:00
|
|
|
const merge = require('webpack-merge');
|
|
|
|
const common = require('./webpack.common.js');
|
2020-03-13 21:35:35 -04:00
|
|
|
const Terser = require('terser-webpack-plugin');
|
2020-02-06 12:27:58 -05:00
|
|
|
|
|
|
|
module.exports = merge(common, {
|
|
|
|
mode: 'production',
|
2020-03-13 21:35:35 -04:00
|
|
|
plugins: [
|
|
|
|
new webpack.DefinePlugin({
|
|
|
|
'process.env.NODE_ENV': JSON.stringify('production'),
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
optimization:{
|
|
|
|
minimizer: [new Terser({
|
|
|
|
test: /\.m?js$/,
|
|
|
|
})]
|
|
|
|
}
|
2020-02-06 12:27:58 -05:00
|
|
|
});
|