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

heads up: swc fails to minify the package correctly #27

Closed
petyosi opened this issue Jul 7, 2023 · 3 comments
Closed

heads up: swc fails to minify the package correctly #27

petyosi opened this issue Jul 7, 2023 · 3 comments

Comments

@petyosi
Copy link

petyosi commented Jul 7, 2023

This is not a bug on the package side, but it can affect the users of it.

SWC (used by Next for production builds) minifies the package incorrectly. It inlines scanLineResult.end to 0 in the scanLine method body, resulting in an invalid left-hand assignment.

Check this SWC Playground.

@marijnh
Copy link
Contributor

marijnh commented Jul 7, 2023

Have you reported this with SWC? I don't, as a rule, want to modify my code to step around bugs in other software.

@petyosi
Copy link
Author

petyosi commented Jul 7, 2023

Of course, your policy makes sense, you need to keep your sanity. swc-project/swc#7640.

@marijnh
Copy link
Contributor

marijnh commented Jul 7, 2023

Thanks for the heads-up, going to close this issue then.

@marijnh marijnh closed this as completed Jul 7, 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

No branches or pull requests

2 participants