Added some comments
This commit is contained in:
parent
56cb78bd40
commit
60c5823ae1
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue