-
-
Notifications
You must be signed in to change notification settings - Fork 220
Open
Description
Code
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');
Output
let isWeb = true;
{
if (isWeb) {
console.log('xyz');
} else {
console.log('abcd');
}
}Expected
let isWeb = true;
{
console.log('xyz');
}Metadata
Metadata
Assignees
Labels
No labels