website/home/webpack.prod.js
corentin e3ddda951f jimmy/events (#6)
Co-authored-by: Jimmy Vargo <james@ayo.tokyo>
Reviewed-on: ayo/website#6
2024-04-09 17:12:41 +09:00

31 lines
575 B
JavaScript

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
})
])
}
);