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

Switch statements: module truncated after empty default case #3236

Closed
jjhembd opened this issue Nov 16, 2019 · 3 comments · Fixed by #3241
Closed

Switch statements: module truncated after empty default case #3236

jjhembd opened this issue Nov 16, 2019 · 3 comments · Fixed by #3241

Comments

@jjhembd
Copy link

jjhembd commented Nov 16, 2019

  • Rollup Version: 1.27.0
  • Operating System (or Browser): Google Chrome
  • Node Version: n/a

How Do We Reproduce?

See this simple test on REPL. Note: in my browser, some of the code is hidden until I click in the code boxes.

With an empty default case in the first switch block, the rest of the module is deleted from the bundle. But if I un-comment the console.log in the default, then the bundle is fine.

Expected Behavior

The code after the first switch block should be retained

Actual Behavior

All code after the empty default case is deleted

@jjhembd
Copy link
Author

jjhembd commented Nov 16, 2019

The problem appears starting from v1.25.0.

@lukastaegert
Copy link
Member

Thanks, fix at #3241

@jjhembd
Copy link
Author

jjhembd commented Nov 18, 2019 via email

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

Successfully merging a pull request may close this issue.

2 participants