-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Next.js app is broken after recently swc upgrade #5989
Comments
Can you share some more information? e.g. Do you need |
Also, can you provide a repro case? |
I looked at 8a5ed1e...main but I concluded I need more info |
Yes. Still trying to provide a simplified repro case. |
Is there an approach to print out current swc config in a nextjs project? |
You need to monkey-patch |
Hi @kdy1 And the repro steps are written on the readme file. |
Thanks! I reproduced and seems like it's an issue of minifier targeting es2015+ |
**Description:** We had two passes for joining variables. This PR removes one in the full optimizer, which is wrong. **Related issue:** - Closes #5989.
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Describe the bug
When we updated our apps from
[email protected]
to[email protected]
(canary.8 can not be found on npm), the minified outputs started to be incorrect. The most suspicious commit is this swc update: vercel/next.js#40832After debugging, I found this bug is related to output for modern browsers:
The bug is not preset when
legacyBrowsers
sets totrue
:Input code
https://github.com/vercel/next.js/blob/f7ce8eceb7a76e6758a9d236ad9711440fb2bb12/packages/next/client/index.tsx#L67
Config
No response
Playground link
No response
Expected behavior
Be minified correctly.
Actual behavior
Due to
from the minified output:
Version
[email protected]+
Additional context
No response
The text was updated successfully, but these errors were encountered: