-
-
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
Elm does not generate optimized code if --no-minify flag is set #3966
Comments
From the docs, I kind of understand the opposite, it mentions Shortening record field names sounds like a form of minification to me, therefore I think this isn't a bug but intended behaviour. It's not a fully fledged minifier but it's still doing some minification/optimisation |
Hey, thank you for the quick answer, I do agree that is not a bug. I see that the So, there are some points that the optimization does:
My main point here is that the elm optimization would be more close to being a production code or not than being minified or not code. I did a pr for a Thanks again for the help |
@jouderianjr I get it, kinda sucks that minification breaks your code. Not entirely sure if we could get this fix in as Parcel 1 is in maintenance mode. |
Sorry, I'm not aware of the current pipeline. so, Parcel 2 is not production-ready right? Even we couldn't add this to Parcel 1, could we change this for Parcel 2? I mean, of course, if the members agreed with this change. As I said, I will be glad to open a pr for that |
@jouderianjr parcel 2 has no elm support at the moment Sent with GitHawk |
@DeMoorJasper so, Parcel 1 being in maintenance mode means the project will not accept this type of Pull requests? Thanks for the clarification :D |
🐛 bug report
I'm not sure if this is exactly a bug, but I would consider one.
Running this command
parcel build {myFile} --out-file bundle.js --target node --bundle-node-modules --no-source-maps --no-minify
generates a not optimized bundle because of this this piece of codeAs this part of documentation says, the elm optimization doesn't mean minification.
I will be glad to open a pr to change this if you agree that would be the correct behavior
🤔 Expected Behavior
The optimization should be linked to the production flag, not to the minification one.
😯 Current Behavior
parcel build --no-minification
generates a not optimized bundle.💁 Possible Solution
Uses
this.options.production
insteadthis.options.minify
💻 Code Sample
parcel build {myFile} --out-file bundle.js --target node --bundle-node-modules --no-source-maps --no-minify
🌍 Your Environment
The text was updated successfully, but these errors were encountered: