Skip to content

Commit

Permalink
Updated integrations
Browse files Browse the repository at this point in the history
  • Loading branch information
JuanM04 committed Apr 6, 2022
1 parent 6753160 commit 93022b4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/integrations/partytown/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ export default function createPlugin(): AstroIntegration {
})
);
},
'astro:build:done': async () => {
await copyLibFiles(fileURLToPath(new URL('~partytown', config.outDir)), {
'astro:build:done': async ({ dir }) => {
await copyLibFiles(fileURLToPath(new URL('~partytown', dir)), {
debugDir: false,
});
},
Expand Down
8 changes: 4 additions & 4 deletions packages/integrations/vercel/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default function vercel(): AstroIntegration {
buildConfig.client = new URL('./static/', _config.outDir);
buildConfig.server = new URL('./server/tmp/', _config.outDir);
},
'astro:build:done': async ({ dir, routes }) => {
'astro:build:done': async ({ routes }) => {
/*
Why do we need two folders? Why don't we just generate all inside `server/pages/`?
When the app builds, it throws some metadata inside a `chunks/` folder.
Expand All @@ -50,8 +50,8 @@ export default function vercel(): AstroIntegration {
need to bundle as much as possible in one file. Hence, the following code
*/

const tmpDir = new URL('./server/tmp/', dir);
const bundleDir = new URL('./server/pages/', dir);
const tmpDir = new URL('./server/tmp/', _config.outDir);
const bundleDir = new URL('./server/pages/', _config.outDir);

await fs.mkdir(bundleDir, { recursive: true });

Expand All @@ -69,7 +69,7 @@ export default function vercel(): AstroIntegration {

// Routes Manifest
// https://vercel.com/docs/file-system-api#configuration/routes
await writeJson(new URL(`./routes-manifest.json`, dir), {
await writeJson(new URL(`./routes-manifest.json`, _config.outDir), {
version: 3,
basePath: '/',
pages404: false,
Expand Down

0 comments on commit 93022b4

Please sign in to comment.