This repository has been archived on 2022-11-26. You can view files and clone it, but cannot push or open issues or pull requests.
2017-12-04 18:20:53 +00:00
|
|
|
const webpack = require('webpack')
|
2020-07-06 18:33:00 +00:00
|
|
|
const { merge } = require('webpack-merge')
|
2017-12-04 18:20:53 +00:00
|
|
|
const common = require('./webpack.common.js')
|
2020-01-28 20:27:24 +00:00
|
|
|
const TerserPlugin = require('terser-webpack-plugin')
|
2017-12-04 18:20:53 +00:00
|
|
|
|
|
|
|
module.exports = merge(common, {
|
2020-01-28 20:27:24 +00:00
|
|
|
mode: 'production',
|
2017-12-04 18:20:53 +00:00
|
|
|
plugins: [
|
|
|
|
new webpack.DefinePlugin({
|
|
|
|
'process.env.NODE_ENV': JSON.stringify('production')
|
2020-01-28 20:27:24 +00:00
|
|
|
})
|
|
|
|
],
|
|
|
|
optimization: {
|
|
|
|
minimize: true,
|
2020-05-28 18:30:21 +00:00
|
|
|
minimizer: [new TerserPlugin()]
|
2020-01-28 20:27:24 +00:00
|
|
|
}
|
2017-12-04 18:20:53 +00:00
|
|
|
})
|