-
-
Notifications
You must be signed in to change notification settings - Fork 15.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
DEV code is now in production bundle in master #2244
Comments
Yeah, not sure why I didn't give that more scrutiny. Luckily, it hasn't been released. We may want to add a quick check of the gzipped UMD bundle size to the build scripts. We do this on react router and it helps guard against ballooning the bundle size, provided you know what a "good" size looks like. I'll revert this once I'm on desktop (since it can't be done automatically). |
Yes, that would be great! |
Do you guys know by any chance how this can be avoided? |
That sounds like a tooling problem. We don't add the polyfill ourselves, so it would seem you need to configure your tooling not to do that. It's similar to checking for a DOM with |
yeah, u have reverted your checks to anyhow i'll try to explore possibilities to avoid this, from that I understand Aurelia has its own bundler which does not recognize EDIT:// also have checked the mentioned commit, but bundled with rollup - bundled file does not include this polyfill (probably thanks to tree shaking?) but is leaving this in the code:
so not rly a good solution either, as it would always fallback to 'development' also out of curiosity - what were the reasons behind chosing rollup vs webpack2? |
@Andarist It's 50% smaller: #2283 (comment) |
This PR broke Uglify's dead code elimination for DEV: #2030.
Uglify is not smart enough to understand that if a literal is assigned to a variable, and later that variable gets compared, it's the same as literal. As a result, DEV-only code ends up in the production bundle:
I suggest reverting #2030, at least in the current form.
The text was updated successfully, but these errors were encountered: