Skip to content

Commit d440521

Browse files
authored
[docs] deprecate build.split and build.excludeMiddleware in config ref (#8158)
1 parent 1f54def commit d440521

File tree

1 file changed

+7
-25
lines changed

1 file changed

+7
-25
lines changed

packages/astro/src/@types/astro.ts

+7-25
Original file line numberDiff line numberDiff line change
@@ -856,22 +856,12 @@ export interface AstroUserConfig {
856856
* @name build.split
857857
* @type {boolean}
858858
* @default `false`
859-
* @version 2.7.0
859+
* @deprecated since version 3.0
860860
* @description
861-
* Defines how the SSR code should be bundled when built.
861+
* The build config option `build.split` has been replaced by the adapter configuration option [`functionPerRoute`](/en/reference/adapter-reference/#functionperroute).
862862
*
863-
* When `split` is `true`, Astro will emit a file for each page.
864-
* Each file emitted will render only one page. The pages will be emitted
865-
* inside a `dist/pages/` directory, and the emitted files will keep the same file paths
866-
* of the `src/pages` directory.
867-
*
868-
* ```js
869-
* {
870-
* build: {
871-
* split: true
872-
* }
873-
* }
874-
* ```
863+
* Please see your [SSR adapter's documentation](/en/guides/integrations-guide/#official-integrations) for using `functionPerRoute` to define how your SSR code is bundled.
864+
*
875865
*/
876866
split?: boolean;
877867

@@ -880,19 +870,11 @@ export interface AstroUserConfig {
880870
* @name build.excludeMiddleware
881871
* @type {boolean}
882872
* @default `false`
883-
* @version 2.8.0
873+
* @deprecated since version 3.0
884874
* @description
885-
* Defines whether or not any SSR middleware code will be bundled when built.
875+
* The build config option `build.excludeMiddleware` has been replaced by the adapter configuration option [`edgeMiddleware`](/en/reference/adapter-reference/#edgemiddleware).
886876
*
887-
* When enabled, middleware code is not bundled and imported by all pages during the build. To instead execute and import middleware code manually, set `build.excludeMiddleware: true`:
888-
*
889-
* ```js
890-
* {
891-
* build: {
892-
* excludeMiddleware: true
893-
* }
894-
* }
895-
* ```
877+
* Please see your [SSR adapter's documentation](/en/guides/integrations-guide/#official-integrations) for using `edgeMiddleware` to define whether or not any SSR middleware code will be bundled when built.
896878
*/
897879
excludeMiddleware?: boolean;
898880
};

0 commit comments

Comments
 (0)