Skip to content

Commit

Permalink
fix: ensure outDir is always created
Browse files Browse the repository at this point in the history
  • Loading branch information
natemoo-re committed Dec 5, 2022
1 parent 537e52a commit 0ee8aef
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/astro/src/integrations/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import fs from 'node:fs';
import { bold } from 'kleur/colors';
import type { AddressInfo } from 'net';
import { fileURLToPath } from 'node:url';
Expand Down Expand Up @@ -345,6 +346,7 @@ export async function runHookBuildDone({
logging: LogOptions;
}) {
const dir = config.output === 'server' ? buildConfig.client : config.outDir;
await fs.promises.mkdir(dir, { recursive: true });

for (const integration of config.integrations) {
if (integration?.hooks?.['astro:build:done']) {
Expand Down

0 comments on commit 0ee8aef

Please sign in to comment.