Template literals omit conditional logic
MatthewCMoya opened this issue · comments
Matthew C. Moya commented
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 `
}
Stephen Baldwin commented
Good find. Do we know if it’s just ignoring conditionals completely or replacing them with the post operator value?