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:
parent
c84e8b8e3e
commit
cc8e9de881
2 changed files with 13 additions and 0 deletions
5
.changeset/dull-weeks-trade.md
Normal file
5
.changeset/dull-weeks-trade.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Throw an error when `build.split` is set to `true` but `output` isn't set to `"server"`.
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue