Econify / ad.js

🚀 Supercharge your Ads.

Home Page:https://adjs.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Template literals omit conditional logic

MatthewCMoya opened this issue · comments

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  `
}

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