Skip to content

Template literals omit conditional logic #49

@MatthewCMoya

Description

@MatthewCMoya

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions