diff --git a/packages/astro/src/core/build/static-build.ts b/packages/astro/src/core/build/static-build.ts index a8cd9a785..78deded54 100644 --- a/packages/astro/src/core/build/static-build.ts +++ b/packages/astro/src/core/build/static-build.ts @@ -164,7 +164,7 @@ async function ssrBuild(opts: StaticBuildOptions, internals: BuildInternals, inp format: 'esm', }, }, - target: 'es2020', // must match an esbuild target + target: 'esnext', // must match an esbuild target }, plugins: [ vitePluginNewBuild(input, internals, 'mjs'), @@ -204,7 +204,7 @@ async function clientBuild(opts: StaticBuildOptions, internals: BuildInternals, }, preserveEntrySignatures: 'exports-only', }, - target: 'es2020', // must match an esbuild target + target: 'esnext', // must match an esbuild target }, plugins: [ vitePluginNewBuild(input, internals, 'js'),