diff --git a/.changeset/pretty-planets-wink.md b/.changeset/pretty-planets-wink.md new file mode 100644 index 000000000000..23208f833dab --- /dev/null +++ b/.changeset/pretty-planets-wink.md @@ -0,0 +1,5 @@ +--- +'@astrojs/vercel': minor +--- + +Add `edge-light` and `worker` import condition for worker bundling diff --git a/packages/integrations/vercel/src/edge/adapter.ts b/packages/integrations/vercel/src/edge/adapter.ts index b6f63b707d99..c11d3482864b 100644 --- a/packages/integrations/vercel/src/edge/adapter.ts +++ b/packages/integrations/vercel/src/edge/adapter.ts @@ -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,