Skip to content

Commit 01b83ce

Browse files
sync: Update Vite docs from upstream 20250428
1 parent 083a391 commit 01b83ce

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

docs/guide/env-and-mode.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Vite exposes certain constants under the special `import.meta.env` object. These constants are defined as global variables during dev and statically replaced at build time to make tree-shaking effective.
44

5-
## Built-in constants
5+
## Built-in Constants
66

77
Some built-in constants are available in all cases:
88

docs/guide/ssr.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ This is statically replaced during build so it will allow tree-shaking of unused
6363
6464
## Setting Up the Dev Server
6565
66-
When building an SSR app, you likely want to have full control over your main server and decouple Vite from the production environment. It is therefore recommended to use Vite in middleware mode. Here is an example with [express](https://expressjs.com/) (v4):
66+
When building an SSR app, you likely want to have full control over your main server and decouple Vite from the production environment. It is therefore recommended to use Vite in middleware mode. Here is an example with [express](https://expressjs.com/):
6767
6868
```js{15-18} twoslash [server.js]
6969
import fs from 'node:fs'
@@ -93,7 +93,7 @@ async function createServer() {
9393
// middlewares). The following is valid even after restarts.
9494
app.use(vite.middlewares)
9595

96-
app.use('*', async (req, res) => {
96+
app.use('*all', async (req, res) => {
9797
// serve index.html - we will tackle this next
9898
})
9999

@@ -119,7 +119,7 @@ var app
119119
var vite
120120

121121
// ---cut---
122-
app.use('*', async (req, res, next) => {
122+
app.use('*all', async (req, res, next) => {
123123
const url = req.originalUrl
124124

125125
try {

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
},
1010
"devDependencies": {
1111
"@shikijs/vitepress-twoslash": "^2.5.0",
12-
"@types/express": "^4.17.21",
12+
"@types/express": "^5.0.1",
1313
"feed": "^4.2.2",
1414
"vitepress": "^1.6.3",
1515
"vitepress-plugin-group-icons": "^1.5.2",

0 commit comments

Comments
 (0)