-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
some minification performed even though minify not enabled #371
Comments
This is intentional. It's constant folding, not minification. This is useful when combined with if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-dom.production.min.js');
} else {
module.exports = require('./cjs/react-dom.development.js');
} Usually you use |
It's not documented as such:
It breaks from convention for other minifiers like uglify and terser with Minification of syntax is generally understood to be a collection of standard compiler optimizations of which constant folding is one. One would not expect to optimize code with just There seems to be a consistency issue as well - if you look at the top post, notice that Closing issue since it's by design. |
Oh I see, you were probably talking about the |
The true/!0 observation was just a tangent.
Proposed behavior:
|
It doesn't appear to be possible to output code without at least some degree of minification - is this by design?
Actual:
Expected:
Encountered when trying to verify non-minified whitespace-removed esbuild output of uglify tests against whitespace-removed input.
The text was updated successfully, but these errors were encountered: