after the support was added for Brotli in 4.1.0, I noticed our prod build started emitting both .gz and .br without anything changing in our setup or configs except updating Webpacker.
Rolling back to 4.0.7 predictably solves the issue.
Is there some way to explicitly disable this output?
Also wondering if there's a way to disable this
@JoshRobertson @njradford this works, but I'd love to see a more accesible config option exposed to disable brotli.
// in production.js
const config = environment.toWebpackConfig();
// Disables brotli (.br) compression
config.plugins = config.plugins.filter(conf => {
if (conf.options) {
return conf.options.filename !== "[path].br[query]";
} else {
return conf;
}
});
you can do it before toWebpackConfig
environment.plugins.delete('Compression Brotli')
but I'd really wanna see plugins section be more configurable through webpacker.yml maybe
Most helpful comment
you can do it before
toWebpackConfigbut I'd really wanna see plugins section be more configurable through webpacker.yml maybe