-
Notifications
You must be signed in to change notification settings - Fork 361
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
Granular compress option #1031
Comments
This in particular would be better served by running Microbundle twice -- |
@rschristian related to that - are there any docs around that? Does Either way, that's just one example use case. In general there are lots of reasons consumers might not need or want to deal with (pre-)minified code. |
Not to my knowledge, might be good to have something in the future though.
Depends on the input really. If one were to use Node built-ins ( However, as Node 12 is roughly equivalent to ES2019, it's somewhat unlikely outside of enterprise that you'll actually have issues loading that Node-targeted bundle in a browser.
Yeah, absolutely, just wanted to address the Node + web thing. Personally, I'm on the fence over it, as I'm not enthusiastic about additional complexity (in both the flags and source) when it's easy for users to simply have two build scripts. |
I think it'd be great to be able to do this:
package.json
Then expand the
--compress
option to allow a regex. So, if you run--compress min
it's saying "Compress the outputs that contain the stringmin
". In the above case, it'd only minify themodule
andunpkg
outputs.This'd be useful to allow node users to use unminified code but browser users to use minified etc. It could be made to be non-breaking by making
--compress true
and--compress false
special cases to enable/disable all.The text was updated successfully, but these errors were encountered: