jimmy/events (#6)
Co-authored-by: Jimmy Vargo <james@ayo.tokyo> Reviewed-on: ayo/website#6
This commit is contained in:
parent
83a0903155
commit
e3ddda951f
76 changed files with 564 additions and 1 deletions
31
home/webpack.prod.js
Normal file
31
home/webpack.prod.js
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
const webpack = require('webpack');
|
||||
const config = require('./webpack.base.js');
|
||||
|
||||
const CompressionPlugin = require("compression-webpack-plugin")
|
||||
|
||||
|
||||
module.exports = Object.assign(
|
||||
config,
|
||||
{
|
||||
mode: "production",
|
||||
optimization:
|
||||
{
|
||||
minimize: true
|
||||
},
|
||||
plugins: config.plugins.concat([
|
||||
new webpack.DefinePlugin(
|
||||
{
|
||||
'process.env':
|
||||
{
|
||||
'DEBUG': false
|
||||
} // set a DEBUG flag that can be used in the scripts (can be skipped)
|
||||
}),
|
||||
new CompressionPlugin(
|
||||
{
|
||||
algorithm: "gzip",
|
||||
test: [/\.js$/, /\.svg$/],
|
||||
threshold: 1000
|
||||
})
|
||||
])
|
||||
}
|
||||
);
|
||||
Loading…
Add table
Add a link
Reference in a new issue