-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Label being incorrectly removed with treeshaking disabled #3473
Comments
@lukastaegert any ideas why this might be happening? |
It is hard to reduce the test case |
Thanks for taking a look - I've managed to isolate it down to three files in a circular reference that use the same label name, where one of the files contains a function from the other. The isolation at https://github.com/guybedford/rollup-label-bug/blob/master/tokenize-string.js now builds the local file directly. It's definitely a complex case - but the fact remains a valid label (and the code is definitely valid) should not be removed when treeshaking is disabled. |
…iables, always inlcude labels when not treeshaking, resolves #3473
Managed to solve it, fix at #3492 |
…iables, always inlcude labels when not treeshaking, resolves #3473
Expected Behavior
There are three labeled
while
loops in the build withloop:
names.When running the build with treeshaking enabled, all three labels remain in the output.
Actual Behavior
When running the build with treeshaking disabled, the first
loop:
label is removed! As a result the internalbreak loop
fails further parsing.The text was updated successfully, but these errors were encountered: