Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] deprecate build.split and build.excludeMiddleware in config ref #8158

Merged
merged 2 commits into from
Aug 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 7 additions & 25 deletions packages/astro/src/@types/astro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -859,22 +859,12 @@ export interface AstroUserConfig {
* @name build.split
* @type {boolean}
* @default `false`
* @version 2.7.0
* @deprecated since version 3.0
* @description
* Defines how the SSR code should be bundled when built.
* The build config option `build.split` has been replaced by the adapter configuration option [`functionPerRoute`](/en/reference/adapter-reference/#functionperroute).
*
* When `split` is `true`, Astro will emit a file for each page.
* Each file emitted will render only one page. The pages will be emitted
* inside a `dist/pages/` directory, and the emitted files will keep the same file paths
* of the `src/pages` directory.
*
* ```js
* {
* build: {
* split: true
* }
* }
* ```
* Please see your [SSR adapter's documentation](/en/guides/integrations-guide/#official-integrations) for using `functionPerRoute` to define how your SSR code is bundled.
*
*/
split?: boolean;

Expand All @@ -883,19 +873,11 @@ export interface AstroUserConfig {
* @name build.excludeMiddleware
* @type {boolean}
* @default `false`
* @version 2.8.0
* @deprecated since version 3.0
* @description
* Defines whether or not any SSR middleware code will be bundled when built.
* The build config option `build.excludeMiddleware` has been replaced by the adapter configuration option [`edgeMiddleware`](/en/reference/adapter-reference/#edgemiddleware).
*
* 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`:
*
* ```js
* {
* build: {
* excludeMiddleware: true
* }
* }
* ```
* 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.
*/
excludeMiddleware?: boolean;
};
Expand Down