Removed extra code
This commit is contained in:
parent
437e08e5ca
commit
c2f4dd44e3
1 changed files with 0 additions and 12 deletions
|
@ -35,10 +35,6 @@ 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);
|
||||||
|
|
||||||
// FIX: Remove these two line before merging
|
|
||||||
await fs.mkdir(pagesDir, { recursive: true });
|
|
||||||
await fs.rename(new URL(`./${ENTRYFILE}.mjs`, dir), new URL(`./${ENTRYFILE}.mjs`, pagesDir));
|
|
||||||
|
|
||||||
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)),
|
||||||
|
@ -56,14 +52,6 @@ export default function vercel(): AstroIntegration {
|
||||||
version: 3,
|
version: 3,
|
||||||
basePath: '/',
|
basePath: '/',
|
||||||
pages404: false,
|
pages404: false,
|
||||||
// redirects: [
|
|
||||||
// {
|
|
||||||
// source: '/nice/',
|
|
||||||
// destination: '/stuff',
|
|
||||||
// statusCode: 308,
|
|
||||||
// regex: '^/nice.*$',
|
|
||||||
// },
|
|
||||||
// ],
|
|
||||||
rewrites: routes.map((route) => ({
|
rewrites: routes.map((route) => ({
|
||||||
source: route.pathname,
|
source: route.pathname,
|
||||||
destination: `/${ENTRYFILE}`,
|
destination: `/${ENTRYFILE}`,
|
||||||
|
|
Loading…
Reference in a new issue