Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b33c363

Browse files
authoredSep 22, 2020
Update build-config.md
1 parent b4e8e6d commit b33c363

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎docs/zh/guide/build-config.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ const renderer = createBundleRenderer('/path/to/vue-ssr-server-bundle.json', {
6464

6565
请注意,在 `externals` 选项中,我们将 CSS 文件列入白名单。这是因为从依赖模块导入的 CSS 还应该由 webpack 处理。如果你导入依赖于 webpack 的任何其他类型的文件(例如 `*.vue`, `*.sass`),那么你也应该将它们添加到白名单中。
6666

67-
如果你使用 `runInNewContext: 'once'``runInNewContext: true`,那么你还应该将修改 `global` 的 polyfill 列入白名单,例如 `babel-polyfill`。这是因为当使用新的上下文模式时,**server bundle 中的代码具有自己的 `global` 对象。**由于在使用 Node 7.6+ 时,在服务器并不真正需要它,所以实际上只需在客户端 entry 导入它。
67+
如果你使用 `runInNewContext: 'once'``runInNewContext: true`,那么你还应该将修改 `global` 的 polyfill 列入白名单,例如 `babel-polyfill`。这是因为当使用新的上下文模式时,**server bundle 中的代码具有自己的 `global` 对象。**
68+
由于在使用 Node 7.6+ 时,在服务器并不真正需要它,所以实际上只需在客户端 entry 导入它。
6869

6970
## 客户端配置 (Client Config)
7071

0 commit comments

Comments
 (0)
Please sign in to comment.