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

DCE is not removed when value is from a const in another module. #3727

Open
alan-agius4 opened this issue Apr 12, 2024 · 0 comments
Open

DCE is not removed when value is from a const in another module. #3727

alan-agius4 opened this issue Apr 12, 2024 · 0 comments

Comments

@alan-agius4
Copy link

alan-agius4 commented Apr 12, 2024

entry.js

import { thisIsTrue } from './file'

if (!thisIsTrue) {console.log('foo')}

file.js

export const thisIsTrue = true

output

(()=>{!0||console.log("foo");})();

Expected

(()=>{var o=!0;})();

Reproduction

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

No branches or pull requests

2 participants