Skip to content
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

Disable deadcode removal in babel-minify #777

Merged
merged 2 commits into from
Nov 5, 2018

Conversation

usergenic
Copy link
Contributor

Fix issue #724 where deadcode removal in babel-minify can be error prone and result in removal of code which should not be removed and cause hard to debug errors.

…ad codepath evaluation removing needed expected code.
@usergenic
Copy link
Contributor Author

There are 3 open issues with deadcode removal that may or may not be directly contributing here, but more importantly, until we can fully rely on deadcode removal behavior, I think we should disable this optimization.

babel/minify#879
babel/minify#895
babel/minify#898

@usergenic usergenic requested review from rictic and aomarks November 5, 2018 19:27
@@ -98,14 +98,20 @@ const babelSyntaxPlugins = [
];

const babelPresetMinify = require('babel-preset-minify')({}, {
// Disable the minify-constant-folding plugin because it has a bug relating to
// Disable the minify-constant-folding plugin because it has a bug relating
// to
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reflow?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

derp! thanks!

@usergenic usergenic merged commit 0193dda into master Nov 5, 2018
@usergenic usergenic deleted the deadcode-removal-considered-harmful branch November 5, 2018 20:38
@moderndeveloperllc
Copy link
Contributor

@usergenic Does this also solve #775?

@usergenic
Copy link
Contributor Author

usergenic commented Nov 5, 2018

@moderndeveloperllc I was not able to replicate that problem with current version of bundler. Solving for the 3.x branch may be possible but I've not yet identified what's causing it.

@usergenic
Copy link
Contributor Author

(edited: "I was not able to replicate")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants