mirror of
https://github.com/withastro/astro.git
synced 2024-12-30 22:03:56 -05:00
Fix static build when out dir is not within the cwd (#9378)
* Fix static build when out dir is not within the cwd * Create lorem-ipsum-dolor Changeset
This commit is contained in:
parent
f8b27b07c0
commit
8c9fe0092a
2 changed files with 6 additions and 1 deletions
5
.changeset/lorem-ipsum-dolor
Normal file
5
.changeset/lorem-ipsum-dolor
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
'astro': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fixes static builds when `config.outDir` is located outside of the astro project
|
|
@ -352,7 +352,7 @@ async function runPostBuildHooks(
|
||||||
? mutation.targets.includes('server')
|
? mutation.targets.includes('server')
|
||||||
? build.server
|
? build.server
|
||||||
: build.client
|
: build.client
|
||||||
: config.outDir;
|
: getOutDirWithinCwd(config.outDir);
|
||||||
const fullPath = path.join(fileURLToPath(root), fileName);
|
const fullPath = path.join(fileURLToPath(root), fileName);
|
||||||
const fileURL = pathToFileURL(fullPath);
|
const fileURL = pathToFileURL(fullPath);
|
||||||
await fs.promises.mkdir(new URL('./', fileURL), { recursive: true });
|
await fs.promises.mkdir(new URL('./', fileURL), { recursive: true });
|
||||||
|
|
Loading…
Reference in a new issue