Skip to content

Commit

Permalink
fix(backend): Support the Vercel edge-light runtime key (#841)
Browse files Browse the repository at this point in the history
The edge-light runtime key was recently added as a condition name for the edge runtime in this PR: vercel/next.js#45188

However, this PR also introduced a change (which might not be intentional): the `node` runtime key is now a valid condition key for the edge runtime, so it matches before our `default` import.

This PR adds the `edge-light` key before `node` so that we guarantee that the correct imports will always be used.
  • Loading branch information
nikosdouvlis authored Feb 20, 2023
1 parent bdd0119 commit 48e937d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,12 @@
},
"imports": {
"#crypto": {
"edge-light": "./dist/runtime/browser/crypto.mjs",
"node": "./dist/runtime/node/crypto.js",
"default": "./dist/runtime/browser/crypto.mjs"
},
"#fetch": {
"edge-light": "./dist/runtime/browser/fetch.mjs",
"node": "./dist/runtime/node/fetch.js",
"default": "./dist/runtime/browser/fetch.mjs"
}
Expand Down

0 comments on commit 48e937d

Please sign in to comment.