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

Last empty statements of case clauses are tree-shaken, but the lines are not removed. #3162

Closed
stephanedr opened this issue Oct 15, 2019 · 1 comment · Fixed by #3166
Closed

Comments

@stephanedr
Copy link

  • Rollup Version: 1.24.0
  • Operating System (or Browser): Linux
  • Node Version: 10.16.3

How Do We Reproduce?

switch (a) {
    case 0:
        console.log();
        break;
    case 1:
        ;
    default:
        ;
}

Expected Behavior

switch (a) {
    case 0:
        console.log();
        break;
    case 1:
    default:
}

Actual Behavior

switch (a) {
    case 0:
        console.log();
        break;
    case 1:

    default:

}
@lukastaegert
Copy link
Member

This has been a long-standing issue, but with some recent improvements in our rendering helpers, it was actually not too difficult to fix in #3166.

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