Closed alex-statsig closed 6 months ago
I can confirm this is caused by serverMinification
being enabled, which was made the default in https://github.com/vercel/next.js/pull/54960. cc @feedthejim
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
Link to the code that reproduces this issue
https://github.com
To Reproduce
When making a production build on nextjs 13.5.2 (updated from 13.4.8), an error occurs on an API route. Interestingly this error does not appear during
pnpm dev
(onlypnpm build && pnpm start
). This makes me thing there is a bug in local package transpilation (the error is occurring in a snippet coming from a local pnpm package that had no issue before updating / when usingpnpm dev
).I'm not sure how to cleanly reproduce this, but I don't think a production-breaking issue like this should be ignored.
Current vs. Expected behavior
Would expect there to not be a production crash in this case (a local package seems to be webpacked incorrectly)
Verify canary release
Provide environment information
Which area(s) are affected? (Select all that apply)
Middleware / Edge (API routes, runtime)
Additional context
I will try to create a simple reproduction, but as this is a production-breaking issue it seems appropriate to file the issue first and try to reproduce better myself after