diff --git a/.changeset/proud-trains-wonder.md b/.changeset/proud-trains-wonder.md new file mode 100644 index 0000000000..0e437cfad6 --- /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 013d83a5bc..5280e69e3d 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.' + ); } }