-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
32 lines (31 loc) · 939 Bytes
/
webpack.config.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
31
32
const CompressionPlugin = require("compression-webpack-plugin");
const zlib = require("zlib");
const { merge } = require("webpack-merge");
var webpack = require('webpack');
const ScalaJS = require("./scalajs.webpack.config");
module.exports = merge(ScalaJS, {
"plugins": [
new CompressionPlugin({
algorithm: "brotliCompress",
filename: "[base].br",
test: /\.js$/,
compressionOptions: {
params: {
[zlib.constants.BROTLI_PARAM_QUALITY]: 11,
},
},
minRatio: 0.8,
deleteOriginalAssets: false,
}),
new CompressionPlugin({
algorithm: "gzip",
filename: "[base].gzip",
test: /\.js$/,
compressionOptions: {
level: 9
},
minRatio: 0.8,
deleteOriginalAssets: false,
}),
]
})