We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
const { transform } = require('@babel/core'); console.log( transform( `let isWeb = true; { if (isWeb) { console.log('xyz'); } else { console.log('abcd'); } } `, { plugins: ['babel-plugin-minify-dead-code-elimination'], } ) );
If code with a block expression, it will not remove the console.log('abcd');
console.log('abcd')
let isWeb = true; { if (isWeb) { console.log('xyz'); } else { console.log('abcd'); } }
let isWeb = true; { console.log('xyz'); }
The text was updated successfully, but these errors were encountered:
babel-plugin-minify-dead-code-elimination v0.3.0 is the expected output.
babel-plugin-minify-dead-code-elimination
Sorry, something went wrong.
The reason of I updated the babel-plugin-minify-dead-code-elimination is the latest version @babel/traverse will remove the ThisExpression #1028
ThisExpression
In my view, is it a break change for @babel/traverse ?
@babel/traverse
No branches or pull requests
Code
If code with a block expression, it will not remove the
console.log('abcd')
;Output
Expected
The text was updated successfully, but these errors were encountered: