Skip to content

Commit

Permalink
Add edge-light and worker to vercel edge bundling (#7103)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy authored May 17, 2023
1 parent b6935e6 commit c91e837
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/pretty-planets-wink.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/vercel': minor
---

Add `edge-light` and `worker` import condition for worker bundling
2 changes: 2 additions & 0 deletions packages/integrations/vercel/src/edge/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ export default function vercelEdge({
await esbuild.build({
target: 'es2020',
platform: 'browser',
// https://runtime-keys.proposal.wintercg.org/#edge-light
conditions: ['edge-light', 'worker', 'browser'],
entryPoints: [entryPath],
outfile: entryPath,
allowOverwrite: true,
Expand Down

0 comments on commit c91e837

Please sign in to comment.