Initial commit
This commit is contained in:
commit
56d40196d6
15 changed files with 490 additions and 0 deletions
29
webpack.prod.js
Normal file
29
webpack.prod.js
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
const webpack = require('webpack');
|
||||
const CompressionPlugin = require("compression-webpack-plugin")
|
||||
const config = require('./webpack.base.js');
|
||||
|
||||
module.exports = Object.assign(
|
||||
config,
|
||||
{
|
||||
mode: "production",
|
||||
optimization:
|
||||
{
|
||||
minimize: true
|
||||
},
|
||||
plugins: [
|
||||
new webpack.DefinePlugin(
|
||||
{
|
||||
'process.env':
|
||||
{
|
||||
'DEBUG': false
|
||||
} // set a DEBUG flag that can be used in the scripts (can be skipped)
|
||||
}),
|
||||
new CompressionPlugin(
|
||||
{
|
||||
filename: "[path].gz[query]",
|
||||
algorithm: "gzip",
|
||||
test: /\.js/
|
||||
})
|
||||
]
|
||||
}
|
||||
);
|
||||
Loading…
Add table
Add a link
Reference in a new issue