-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add support for Brotli compression #2273
Conversation
Ah, Brotli has its own entry in |
d5b9fdc
to
716ac1d
Compare
Hey! That is so cool, thank you @clupprich 👍 I think we should add configuration example and installation details in the https://github.com/rails/webpacker/blob/master/docs/deployment.md? What do you think? Thanks |
@guillaumebriday Definitely! Do you think we should also add a config flag to enable/disable this? Because Brotli isn't widely supported yet by e.g. hosted solutions (Heroku, afaik), this can be overhead that people don't need. |
I think we should not add a specific config option only for Brotli even if it's not supported by some hosted solutions. These solutions will simply ignore the Brotli files. I think, we can add sentence like that but for Brotli:
And add a link (or steps) to install it with a warning on the minimal node version required. What do you think? |
Added the instructions in f70f7ef. Turns out the hard part is not the code, but the documentation ;). Let me know if that section makes sense. |
It makes sens ! The google's instructions are not very clear imo. I think this line should be removed. |
f70f7ef
to
a216db6
Compare
🤦♂ |
Thanks @clupprich |
🎉 Thanks @guillaumebriday and @gauravtiwari |
🎉 |
Adds support for Brotli compression via the
compression-webpack-plugin
package/plugin when running Node versions >=11.7.0, as described in #2089.I could use some help in writing tests for this - any good starting points?
I'm also not really happy about the added dependency on theFixed that in 716ac1d by checking the presence ofsemver
package - maybe some small utility function would do the trick here?process.versions.brotli
.