diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index e7bae559..ff1c402a 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -109,6 +109,16 @@ function sidebarGuide() { { text: 'Connecting to a CMS', link: '/guide/cms' } ] }, + { + text: 'Experimental', + collapsed: false, + items: [ + { + text: 'MPA Mode', + link: '/guide/mpa-mode' + } + ] + }, // { // text: 'Migrations', // collapsed: false, diff --git a/docs/guide/mpa-mode.md b/docs/guide/mpa-mode.md new file mode 100644 index 00000000..e4bcd0f2 --- /dev/null +++ b/docs/guide/mpa-mode.md @@ -0,0 +1 @@ +# MPA Mode diff --git a/docs/reference/cli.md b/docs/reference/cli.md index 363e73b0..0536d41e 100644 --- a/docs/reference/cli.md +++ b/docs/reference/cli.md @@ -39,7 +39,7 @@ vitepress build [root] | Option | Description | | - | - | -| `--mpa` (experimental) | Build in MPA mode without client-side hydration (`boolean`) | +| `--mpa` (experimental) | Build in [MPA mode](/guide/mpa-mode) without client-side hydration (`boolean`) | | `--base ` | Public base path (default: `/`) (`string`) | | `--target ` | Transpile target (default: `"modules"`) (`string`) | | `--outDir ` | Output directory (default: `.vitepress/dist`) (`string`) | diff --git a/docs/reference/site-config.md b/docs/reference/site-config.md index 0ca377ea..a784a945 100644 --- a/docs/reference/site-config.md +++ b/docs/reference/site-config.md @@ -293,6 +293,13 @@ export default { } ``` +### mpa + +- Type: `boolean` +- Default: `false` + +When set to `true`, the production app will be built in [MAP Mode](/guide/mpa-mode). MPA mode ships 0kb JavaScript by default, at the cost of disabling client-side navigation and requires explicit opt-in for interactivity. + ## Theming ### appearance