summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.changeset/proud-trains-wonder.md5
-rw-r--r--packages/astro/src/core/build/index.ts16
2 files changed, 13 insertions, 8 deletions
diff --git a/.changeset/proud-trains-wonder.md b/.changeset/proud-trains-wonder.md
new file mode 100644
index 000000000..0e437cfad
--- /dev/null
+++ b/.changeset/proud-trains-wonder.md
@@ -0,0 +1,5 @@
+---
+'astro': patch
+---
+
+Add useful warning when deprecated options are still used.
diff --git a/packages/astro/src/core/build/index.ts b/packages/astro/src/core/build/index.ts
index 013d83a5b..5280e69e3 100644
--- a/packages/astro/src/core/build/index.ts
+++ b/packages/astro/src/core/build/index.ts
@@ -242,6 +242,10 @@ class AstroBuilder {
'The option `build.split` won\'t take effect, because `output` is not `"server"` or `"hybrid"`.'
);
}
+ this.logger.warn(
+ 'configuration',
+ 'The option `build.split` is deprecated. Use the adapter options.'
+ );
}
if (config.build.excludeMiddleware === true) {
if (config.output === 'static') {
@@ -250,14 +254,10 @@ class AstroBuilder {
'The option `build.excludeMiddleware` won\'t take effect, because `output` is not `"server"` or `"hybrid"`.'
);
}
- }
-
- 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"`.'
- );
- }
+ this.logger.warn(
+ 'configuration',
+ 'The option `build.excludeMiddleware` is deprecated. Use the adapter options.'
+ );
}
}