Added some comments

This commit is contained in:
JuanM04 2022-03-31 15:37:33 -03:00
parent 56cb78bd40
commit 60c5823ae1
No known key found for this signature in database
GPG key ID: 0171B712E406271A

View file

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