0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-06 22:10:10 -05:00

fix: throw an error for incorrect configuration (#7680)

Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
This commit is contained in:
Emanuele Stoppa 2023-07-17 14:35:29 +01:00 committed by GitHub
parent c84e8b8e3e
commit cc8e9de881
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 0 deletions

View file

@ -0,0 +1,5 @@
---
'astro': patch
---
Throw an error when `build.split` is set to `true` but `output` isn't set to `"server"`.

View file

@ -229,6 +229,14 @@ class AstroBuilder {
);
}
}
if (config.build.split === true) {
if (config.output !== 'server') {
throw new Error(
'The option `build.split` can only be used when `output` is set to `"server"`.'
);
}
}
}
/** Stats */