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
Error in production version minification in next 13, error not in next 12 or dev version of next 13 #43208
Comments
This comment was marked as off-topic.
This comment was marked as off-topic.
Hi, can you confirm this issue is still present in |
I believe it is still happening with canary 4. I pushed this latest canary to my repro |
I could confirm on |
I reduced the example a little more, so now it is just using @gmod/binary-parser (which is our fork of https://github.com/keichi/binary-parser). Interestingly, I found the normal https://github.com/keichi/binary-parser does not have the issue. both @gmod/binary-parser and binary-parser packages uses |
This will be fixed by swc-project/swc#6521 |
**Related issue:** - Closes #6504. - vercel/next.js#43208.
Closing as this is fixed by #43652 |
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. |
Verify canary release
Provide environment information
What browser are you using? (if relevant)
Chrome 107.0.5304.110, also Firefox 107.0
How are you deploying your application? (if relevant)
next start
Describe the Bug
I have an app where in dev mode (next dev) the app works, but next build+next start appears to introduce a minification bug. It works with next 12.x but appeared to cause issue with next 13. I don't have a super minimal example (yet) but can try to find one if interested (and similarly, move to another repo like swc if it makes sense?)
Expected Behavior
Minification should produce a valid program
Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
https://github.com/cmdcolin/nextjs-13-minify-error
To Reproduce
I reduced the example somewhat to the usage of (our) library https://github.com/GMOD/cram-js/ and made a smaller reproducible example here https://github.com/cmdcolin/nextjs-13-minify-error
The TLDR of how this example was made was just a simple create-next-app with next 13, add @gmod/cram library, add basic usage of this library to pages/index.tsx, and run in production produces the syntax error from bad minification. I did
yarn add next@canary
and had the same bugThe app works with next 12 though
I could possibly make the reproducible case more minimal if interested
The text was updated successfully, but these errors were encountered: