sst / open-next

Open source Next.js serverless adapter
https://open-next.js.org
MIT License
3.73k stars 112 forks source link

fix(open-next): use dynamic import handler for monorepo entrypoint #341

Closed lucasvieirasilva closed 6 months ago

lucasvieirasilva commented 6 months ago

This PR fixes the issue described in this issue #340

Solution

By using the import() function the process.env = ... block runs first and the CACHE_BUCKET_REGION is defined.

Tests

I've published it to a personal organization (https://www.npmjs.com/package/@sstlv/open-next) and tested it in my project, it's working properly.

changeset-bot[bot] commented 6 months ago

🦋 Changeset detected

Latest commit: 2a93bef635dd3806fac3b78c9121f9747d320f78

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages | Name | Type | | ---------------- | ----- | | open-next | Patch | | app-pages-router | Patch | | app-router | Patch | | tests-unit | Patch |

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

vercel[bot] commented 6 months ago

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 Jan 5, 2024 3:42pm