forked from OpenStackweb/openstacksignage
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.prod.js
31 lines (29 loc) · 937 Bytes
/
webpack.prod.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
const webpack = require('webpack')
const TerserJSPlugin = require('terser-webpack-plugin');
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const { merge } = require('webpack-merge');
const common = require('./webpack.common.js');
module.exports = merge(common, {
mode: 'production',
devtool: 'source-map',
optimization: {
minimizer: [
new TerserJSPlugin({terserOptions: {compress: {inline: false}}}),
new OptimizeCSSAssetsPlugin({})
],
splitChunks: {
chunks: 'all'
}
},
plugins: [
// http://vue-loader.vuejs.org/en/workflow/production.html
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: '"production"'
}
}),
new webpack.LoaderOptionsPlugin({
minimize: true
})
]
});