-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Parcel 2: gzip optimizer #3731
Comments
Hello @devongovett, From what I understood, a Parcel Optimizer takes a single bundle and has an opportunity to optimize its contents. My use case would be to precompress (gzip/brotli) all compressible bundles so my static server can serve them directly.
WDYT? |
transform the bundle content. For example you also have to manually check for And the problem you've described is exactly why this isn't implemented yet: for this feature, optimizers really need to create multiple output bundles for one input bundle. The only "workaround" with the current API is a reporter... |
@mischnic 😄 OK, now I get it. Thanks for you quick reply. I guess this is not something trivial to modify. Good luck to the team and let me know if I can help (test, review, contribute...). |
Create the
@parcel/optimizer-gzip
package. This should include an Optimizer plugin that compresses bundles with gzip. It should use the builtinzlib
module of Node to compress the bundle.Because not all users will expect this optimization to be enabled by default, it should not be included in the default config. To use it, users can extend their project's
.parcelrc
like this:The text was updated successfully, but these errors were encountered: