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

__NO_SIDE_EFFECTS__ on template literal tag function is not applied #3511

Closed
jdanyow opened this issue Nov 29, 2023 · 0 comments
Closed

__NO_SIDE_EFFECTS__ on template literal tag function is not applied #3511

jdanyow opened this issue Nov 29, 2023 · 0 comments

Comments

@jdanyow
Copy link

jdanyow commented Nov 29, 2023

I think there's an issue where template literal tag functions annotated with NO_SIDE_EFFECTS are still minified as if they do have side effects.

Minimal reproduction in playground

Input

/*#__NO_SIDE_EFFECTS__*/
function html(strings, ...values) {
  return { strings, values }
}

html`should not be in output`;

Output (using --minify)

function html(t,...n){return{strings:t,values:n}}html`should not be in output`;

Expected output

function html(t,...n){return{strings:t,values:n}}

Related

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

No branches or pull requests

2 participants