Skip to content

Commit

Permalink
chore: better ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
patak-dev committed Jul 3, 2022
1 parent 48efde7 commit 15b264b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/config/index.md
Expand Up @@ -78,10 +78,10 @@ export default defineConfig(({ command, mode, ssrBuild }) => {
})
```

Only `ssrBuild` is included, as during dev, the config creates a single server shared between the SSR and non-SSR requests.

It is important to note that in Vite's API the `command` value is `serve` during dev (in the cli `vite`, `vite dev`, and `vite serve` are aliases), and `build` when building for production (`vite build`).

Only `ssrBuild` is included instead of a more general `ssr` flag because, during dev, the config is shared by the single server handling SSR and non-SSR requests.

## Async Config

If the config needs to call async function, it can export a async function instead:
Expand Down

0 comments on commit 15b264b

Please sign in to comment.