summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/integrations/vercel/src/index.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/integrations/vercel/src/index.ts b/packages/integrations/vercel/src/index.ts
index ac3a4f9f0..8834d3662 100644
--- a/packages/integrations/vercel/src/index.ts
+++ b/packages/integrations/vercel/src/index.ts
@@ -37,6 +37,7 @@ export default function vercel(): AstroIntegration {
'astro:build:done': async ({ dir, routes }) => {
const pagesDir = new URL('./server/pages/', dir);
+ // Convert server entry to CommonJS
await esbuild.build({
entryPoints: [fileURLToPath(new URL(`./${ENTRYFILE}.mjs`, pagesDir))],
outfile: fileURLToPath(new URL(`./${ENTRYFILE}.js`, pagesDir)),
@@ -45,7 +46,6 @@ export default function vercel(): AstroIntegration {
platform: 'node',
target: 'node14',
});
-
await fs.rm(new URL(`./${ENTRYFILE}.mjs`, pagesDir));
// Routes Manifest