Replies: 1 comment
-
After chatting with Michael and others, instead of implementing this, we thought it would be better to flip to ESM-first once we stop supporting node < 18. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
We are in a messy world with npm and CJS/ESM. As we see more packages switch over to ESM, we sometimes update a dependency and something breaks.
Often the solution is just: add the package to
serverDependenciesToBundle
. There is a nice warning that you often see, you make the change, and you are golden.You can also just set
serverDependenciesToBundle
toall
which is great if you are in the lovely ESM future where no CJS exists, but could we offer another solution?Either by default, or explicitly by setting
serverDependenciesToBundle
toauto
results in the compiler automatically bundling if theesmOnly
check it true. The infra is all there as we warn on it.We could change this to:
If we find that this is working well we could default to this vs.
auto
.Beta Was this translation helpful? Give feedback.
All reactions