Skip to content
This repository has been archived by the owner on Feb 10, 2025. It is now read-only.

fix(vercel): update middleware esbuild settings #519

Merged
merged 2 commits into from
Jan 23, 2025
Merged

Conversation

ascorbic
Copy link
Contributor

@ascorbic ascorbic commented Jan 23, 2025

Changes

Vercel builds its own edge functions with the esnext target, because the Cloudflare workerd runtime they use updates v8 every week.

See comment here

Also updates conditions slightly so that it also includes the workerd condition. Browser doesn't need to be manually added as it's included by default

Fixes #495

Testing

Added top level await to a edge middleware to ensure it works. It won't compile with the previous settings.

Docs

Copy link

changeset-bot bot commented Jan 23, 2025

🦋 Changeset detected

Latest commit: e5b6158

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 20 packages
Name Type
@astrojs/vercel Patch
@test/astro-vercel-basic Patch
@test/astro-vercel-image Patch
@test/astro-vercel-integration-assets Patch
@test/vercel-isr Patch
@test/vercel-max-duration Patch
@test/vercel-edge-middleware-with-edge-file Patch
@test/vercel-edge-middleware-without-edge-file Patch
@test/astro-vercel-no-output Patch
@test/astro-vercel-prerendered-error-pages Patch
@test/astro-vercel-redirects-serverless Patch
@test/astro-vercel-redirects Patch
@test/vercel-server-islands Patch
@test/astro-vercel-serverless-prerender Patch
@test/astro-vercel-serverless-with-dynamic-routes Patch
@test/astro-vercel-static-assets Patch
@test/astro-vercel-static Patch
@test/vercel-streaming Patch
@test/astro-vercel-with-web-analytics-enabled-output-as-static Patch
vercel-hosted-astro-project Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the pkg: vercel Related to Vercel adapter (scope) label Jan 23, 2025
@ascorbic ascorbic merged commit 641d7d5 into main Jan 23, 2025
8 checks passed
@github-actions github-actions bot mentioned this pull request Jan 23, 2025
@florian-lefebvre florian-lefebvre deleted the vercel-target branch January 23, 2025 15:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pkg: vercel Related to Vercel adapter (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vercel edge middleware targets es2020, which doesn't support top level await
2 participants