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

Configuring the ignoreAnnotations parameter is invalid #14021

Closed
7 tasks done
vxow opened this issue Aug 4, 2023 · 2 comments
Closed
7 tasks done

Configuring the ignoreAnnotations parameter is invalid #14021

vxow opened this issue Aug 4, 2023 · 2 comments

Comments

@vxow
Copy link

vxow commented Aug 4, 2023

Describe the bug

esbuild: {
ignoreAnnotations: true
}

This will cause the comments for vue3 to be removed, Affect normal logic.
E.g. /* STABLE / / TEXT */

ignoreAnnotations: !isBuild,

Reproduction

Steps to reproduce

No response

System Info

-

Used Package Manager

npm

Logs

No response

Validations

@bluwy
Copy link
Member

bluwy commented Aug 14, 2023

Is this for optimize in build only? Looks like it's added in #8358 but I don't have the full context.

It would also be great if you can provide a repro here.

@sapphi-red
Copy link
Member

esbuild strips all comments except /* @__PURE__ */ or /* #__PURE__ */. --ignore-annotations only changes the behavior for these pure comments.
repro: https://esbuild.github.io/try/#dAAwLjE5LjMAAC8vIGNvbW1lbnQKY29uc3QgZm9vID0gJ2ZvbycKCi8qIGNvbW1lbnQgKi8KY29uc3QgYmFyID0gJ2JhcicKCmNvbnN0IGJheiA9IC8qIEBfX1BVUkVfXyAqLygoKSA9PiAnJykoKQo

Removing pure comments won't cause problems other than not being tree-shaked.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants