New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Brotli support #118
Comments
Feel free to send a PR |
I'm happy to report that this already "just works" (no need for a PR). You just need to be running Node 11.7.0 or later: new CompressionPlugin({
filename: '[path].br[query]',
algorithm: 'brotliCompress',
test: /\.(js|css|html|svg)$/,
compressionOptions: { level: 11 },
threshold: 10240,
minRatio: 0.8,
deleteOriginalAssets: false
}),
new CompressionPlugin({
filename: '[path].gz[query]',
algorithm: 'gzip',
test: /\.(js|css|html|svg)$/,
compressionOptions: { level: 9 },
threshold: 10240,
minRatio: 0.8,
deleteOriginalAssets: false
}), output:
Additional options can be found here: https://github.com/nodejs/node/blob/master/doc/api/zlib.md#compressor-options |
@khalwat can you send a PR to |
@evilebottnawi done -> #119 |
Any way to support with |
Feature Proposal
Node 11.7.0 has native support for Brotli compression in its
zlib
module.Feature Use Case
Smaller files compared to Gzip:
Not having to rely on external libraries like iltorb used in brotli-webpack-plugin
The text was updated successfully, but these errors were encountered: