Closed plevavas closed 1 year ago
How does standalone output work with monorepo? I was experiencing problems with Next not properly bundling dependencies for standalone output (aka.
.next/standalone/node_modules
folder was mostly empty). Do you have any monorepo example I might test on? :)
After some tests, it works correctly. .next/standalone/node_modules
is correctly filled. You can test with this repository : https://github.com/plevavas/monorepo
Hey! I went through your examples and tested it out.
To make it work, we need indeed outputFileTracing
option, however, we also need hoistingLimits: workspace
set as yarn option. See: https://github.com/vercel/next.js/issues/36386#issuecomment-1137665939
With that being said, I figured that we might ditch the option of nextPath
and instead do it automatically (aka. search in output for server.js
and make it work out of the box without adding parameters.
I will look at it during the day and try to make it work correctly for your usecase :)
Updated README with monorepo notes :) Tested on your repo, all works fine now. No need for additional flag, lookup for nested output is automatic now.
Thank you for kicking this off! Appreciated 💙
Thanks a lot for your reactivity 👍
How does standalone output work with monorepo? I was experiencing problems with Next not properly bundling dependencies for standalone output (aka.
.next/standalone/node_modules
folder was mostly empty). Do you have any monorepo example I might test on? :)