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

fix(vitePreprocess): remove dangling pure annotations #609

Merged
merged 1 commit into from Mar 30, 2023

Conversation

dominikg
Copy link
Member

see sveltejs/kit#9492

This is a workaround, the actual cause is the svelte compiler moving inline pure annotation comments to the end of a line, so that the subsequent bundling step associates them with a different node, possibly causing code to be removed that should have been preserved or otherwise altering the build output.

/* @__PURE__ */ comments that are at the end of a line are being replaced with the same amount of spaces so that character count/sourcemaps remain unaffected.

@dominikg dominikg merged commit 5e9ec70 into main Mar 30, 2023
6 checks passed
@dominikg dominikg deleted the fix/dangling-pure branch March 30, 2023 07:07
@github-actions github-actions bot mentioned this pull request Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants