-
Notifications
You must be signed in to change notification settings - Fork 67
Next dynamic loading breaks with experimental-serverless-trace #121
Comments
heyo @afzalsayed96, started to dig into this but not quite sure yet what exactly is going on and why and how to fix it, lol. i see what's different in the source/next dist between serverless and e-s-t, but not sure why. it seems in serverless the dynamic import is almost treated as a normal import in the generated .js. in e-s-t, it is explicitly trying to require that long generated Next 9.5.3 e-s-t with preview mode
and earlier in that file:
aka the actual line that errors out and the file that shows up in the error output Next 9.5.3 serverless with preview mode
will try to figure out how best to handle soon. hopefully this isn't blocking you too much! the issues you open on here are always so tricky! 🤪 |
Thanks for reporting, @afzalsayed96! 😊 My personal understanding of this issue is that When you hit The var chunk = require("../" + ({}[chunkId]||chunkId) + "." + {"5":"048e8065a392725aec21"}[chunkId] + ".js"); I don't have an immediate fix in mind... Maybe we need to add some code to |
I am in a situation where I need to use
The resulting deployment looks like this: https://main--zen-neumann-0e124c.netlify.app/
When bundling this locally using Do note that by simply removing the |
@spencewood @afzalsayed96 opened a PR. if yall wanna install the branch |
@lindsaylevine yep, that fixes it! I look forward to it being included with the Netlify plugin. Thanks! |
Describe the bug
When using
experimental-serverless-trace
along with preview mode on Next v10.0.3, lazy loading components withdynamic
breaks.To Reproduce
Steps to reproduce:
Versions
The text was updated successfully, but these errors were encountered: