Skip to content

Commit c91e837

Browse files
authored
Add edge-light and worker to vercel edge bundling (#7103)
1 parent b6935e6 commit c91e837

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.changeset/pretty-planets-wink.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@astrojs/vercel': minor
3+
---
4+
5+
Add `edge-light` and `worker` import condition for worker bundling

packages/integrations/vercel/src/edge/adapter.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ export default function vercelEdge({
119119
await esbuild.build({
120120
target: 'es2020',
121121
platform: 'browser',
122+
// https://runtime-keys.proposal.wintercg.org/#edge-light
123+
conditions: ['edge-light', 'worker', 'browser'],
122124
entryPoints: [entryPath],
123125
outfile: entryPath,
124126
allowOverwrite: true,

0 commit comments

Comments
 (0)