I'm trying to compress my files to speed up access to my website.
To do so I want to use compression-webpack-plugin. I've formatted it like this:
new CompressionPlugin({
filename: 'C:/test/[name].gz[query]',
algorithm: 'gzip',
test: /\.js$|\.css$|\.html$/,
threshold: 0,
minRatio: 0
}),
new CompressionPlugin({
filename: 'C:\\test\\[name].br[query]',
algorithm: 'brotliCompress',
test: /\.(js|css|html|svg)$/,
compressionOptions: {
params: {
[zlib.constants.BROTLI_PARAM_QUALITY]: 11
}
},
threshold: 0,
minRatio: 0
})
I set the path on purpose to C:/test to see if the compression step was actually doing anything at all.
If I run my server build/host command I see it being executed in the steps. Command:
npx webpack server --progress --stats-error-details --config build/webpack.prod.conf.js
https://i.snipboard.io/41hTS3.jpg
Yet somehow no files are (ever) created.
https://i.snipboard.io/SLg1Ft.jpg
I must be missing something very straightforward, can anyone give me some pointers?