Skip to content

Commit 82075ce

Browse files
authored
docs(zh): update deployment.md (#6487)
1 parent 9f2aa63 commit 82075ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: docs/zh/guide/deployment.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ serve -s dist
1919

2020
### 使用 `history.pushState` 的路由
2121

22-
如果你在 `history` 模式下使用 Vue Router,是无法搭配简单的静态文件服务器的。例如,如果你使用 Vue Router 为 `/todos/42/` 定义了一个路由,开发服务器已经配置了相应的 `localhost:3000/todos/42` 响应,但是一个为生产环境构建架设的简单的静态服务器会却会返回 404。
22+
如果你在 `history` 模式下使用 Vue Router,是无法搭配简单的静态文件服务器的。例如,如果你使用 Vue Router 为 `/todos/42/` 定义了一个路由,开发服务器已经配置了相应的 `localhost:3000/todos/42` 响应,但是一个为生产环境构建架设的简单的静态服务器会返回 404。
2323

2424
为了解决这个问题,你需要配置生产环境服务器,将任何没有匹配到静态文件的请求回退到 `index.html`。Vue Router 的文档提供了[常用服务器配置指引](https://router.vuejs.org/zh/guide/essentials/history-mode.html)
2525

0 commit comments

Comments
 (0)