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

Template literals omit conditional logic #49

Open
MatthewCMoya opened this issue Jun 3, 2019 · 1 comment
Open

Template literals omit conditional logic #49

MatthewCMoya opened this issue Jun 3, 2019 · 1 comment

Comments

@MatthewCMoya
Copy link
Contributor

The whitespace removal plugin for rollup removes conditional logic and replaces with the post operator value.

function proof(someValue?: string) {
  return `Some text ${ someValue || '' }`
}

post build becomes

function proof(someValue?: string) {
  return `Some text  `
}
@stephenbaldwin
Copy link
Contributor

Good find. Do we know if it’s just ignoring conditionals completely or replacing them with the post operator value?

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

No branches or pull requests

2 participants