0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-03-10 23:01:26 -05:00

Added some comments

This commit is contained in:
JuanM04 2022-03-31 15:37:33 -03:00
parent 821a0cd68e
commit 8b7e790db8

View file

@ -37,6 +37,7 @@ export default function vercel(): AstroIntegration {
'astro:build:done': async ({ dir, routes }) => { 'astro:build:done': async ({ dir, routes }) => {
const pagesDir = new URL('./server/pages/', dir); const pagesDir = new URL('./server/pages/', dir);
// Convert server entry to CommonJS
await esbuild.build({ await esbuild.build({
entryPoints: [fileURLToPath(new URL(`./${ENTRYFILE}.mjs`, pagesDir))], entryPoints: [fileURLToPath(new URL(`./${ENTRYFILE}.mjs`, pagesDir))],
outfile: fileURLToPath(new URL(`./${ENTRYFILE}.js`, pagesDir)), outfile: fileURLToPath(new URL(`./${ENTRYFILE}.js`, pagesDir)),
@ -45,7 +46,6 @@ export default function vercel(): AstroIntegration {
platform: 'node', platform: 'node',
target: 'node14', target: 'node14',
}); });
await fs.rm(new URL(`./${ENTRYFILE}.mjs`, pagesDir)); await fs.rm(new URL(`./${ENTRYFILE}.mjs`, pagesDir));
// Routes Manifest // Routes Manifest