Add edge-light and worker to vercel edge bundling (#7103)

This commit is contained in:
Bjorn Lu 2023-05-17 21:06:18 +08:00 committed by GitHub
parent b6935e6ac5
commit c91e837e96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View file

@ -0,0 +1,5 @@
---
'@astrojs/vercel': minor
---
Add `edge-light` and `worker` import condition for worker bundling

View file

@ -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,