Skip to content

Commit

Permalink
documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico committed May 29, 2023
1 parent d6188c5 commit f98d395
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 1 deletion.
36 changes: 35 additions & 1 deletion packages/astro/src/@types/astro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -734,16 +734,50 @@ export interface AstroUserConfig {
*/
serverEntry?: string;

/**
* @docs
* @name build.serverlessEntryPrefix
* @type {string}
* @default `'entry'`
* @description
* Option used when `build.mode` is set to `"serverless"`. Astro will prepend
* the emitted files using this option.
*
* ```js
* {
* build: {
* serverlessEntryPrefix: 'main'
* }
* }
* ```
*/
serverlessEntryPrefix?: string;

/**
* @docs
* @name build.mode
* @type {string}
* @default `'server'`
* @default {'server' | 'serverless'}
* @description
* Defines how the SSR should be bundled. SSR code for "server"
* will be built in one single file.
*
* When "serverless" is specified, Astro will emit a file for each page.
* Each file emitted will render only one page. The pages will be emitted
* inside a `pages/` directory, and emitted file will keep the same file paths
* of the `src/pages` directory.
*
* Each emitted file will be prefixed with `entry`. You can use {@link build.serverlessEntryPrefix}
* to change the prefix.
*
* Inside the `dist/` directory, the pages
* ```plaintext
* ├── pages
* │ ├── blog
* │ │ ├── entry._slug_.astro.mjs
* │ │ └── entry.about.astro.mjs
* │ └── entry.index.astro.mjs
* ```
*
* ```js
* {
Expand Down
12 changes: 12 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f98d395

Please sign in to comment.