Closed conico974 closed 1 month ago
Latest commit: 9b483d5fdf5d7e57ec6dfc6dbc7a20d7a6df7642
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
open-next | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | May 24, 2024 11:33am |
Before this PR, OpenNext used a single compiled
open-next.config.mjs
file even for the edge runtime. It achieved this by setting the platform as neutral in esbuild which caused a lot of trouble when using custom overrides.With this PR OpenNext will create 2 different bundle for
open-next.config.mjs
, one for node and one for edge, and copy the correct one depending on the function runtime. To properly support this, there is a new build args--node-externals
that is used for esbuild during compilation ofopen-next.config.ts
( for example--node-externals "@aws-sdk/*,sharp"
to remove every aws sdk and sharp deps from the config file ). There is also a new options inopen-next.config.ts
:edgeExternals
that serve the same purpose but for the edge version ofopen-next.config.mjs
It also fix an issue where custom lazy loaded override where not used for functions other than the default one