Skip to content

Clarify the behavior of #__PURE__ for tagged templates #7

@sapphi-red

Description

@sapphi-red

The spec does not clarify whether #__PURE__ applies to tagged templates.

/* #__PURE__ */ foo``
Tool result playground
terser
Rollup link
esbuild link
SWC link
Oxc link

✅: removes the expression
❌: does not remove the expression

Currently, the behaviors are aligned expect for SWC.

I think we should clarify that #__PURE__ does not apply for tagged templates.

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