Skip to content

Commit f4084ab

Browse files
committed
[docs][zh] translated all new parts
1 parent 5e7a3d0 commit f4084ab

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

docs/zh/guide/pre-processors.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,11 @@ npm install -D babel-core babel-loader
172172

173173
Babel 的配置可以通过 `.babelrc``babel-loader` 选项来完成。
174174

175-
### Excluding node_modules
175+
### 排除 node_modules
176176

177-
It is common to have `exclude: /node_modules/` for JS transpilation rules (e.g. `babel-loader`) that apply to `.js` files. Due to the inference change of v15, if you import a Vue SFC inside `node_modules`, its `<script>` part will be excluded from transpilation as well.
177+
`exclude: /node_modules/` 在运用于 `.js` 文件的 JS 转译规则 (例如 `babel-loader`) 中是蛮常见的。鉴于 v15 中的推导变化,如果你导入一个 `node_modules` 内的 Vue 单文件组件,它的 `<script>` 部分在转译时将会被排除在外。
178178

179-
In order to ensure JS transpilation is applied to Vue SFCs in `node_modules`, you need to whitelist them by using an exclude function instead:
179+
为了确保 JS 的转译应用到 `node_modules` 的 Vue 单文件组件,你需要通过替换使用一个排除函数将其设为白名单:
180180

181181
``` js
182182
{

docs/zh/migrating.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ module.exports = {
5757

5858
v15 也允许为 loader 使用非序列化的选项,这种选项在之前的版本中是无法使用的。
5959

60-
### Importing SFCs from Dependencies
60+
### 从依赖中导入单文件组件
6161

62-
It is common to have `exclude: /node_modules/` for JS transpilation rules (e.g. `babel-loader`) that apply to `.js` files. Due to the inference change of v15, if you import a Vue SFC inside `node_modules`, its `<script>` part will be excluded from transpilation as well.
62+
`exclude: /node_modules/` 在运用于 `.js` 文件的 JS 转译规则 (例如 `babel-loader`) 中是蛮常见的。鉴于 v15 中的推导变化,如果你导入一个 `node_modules` 内的 Vue 单文件组件,它的 `<script>` 部分在转译时将会被排除在外。
6363

64-
In order to ensure JS transpilation is applied to Vue SFCs in `node_modules`, you need to whitelist them by using an exclude function instead:
64+
为了确保 JS 的转译应用到 `node_modules` 的 Vue 单文件组件,你需要通过替换使用一个排除函数将其设为白名单:
6565

6666
``` js
6767
{

docs/zh/options.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,4 @@ sidebar: auto
7373
- 类型:`boolean`
7474
- 默认值:`false`
7575

76-
Compiled the component for usage inside Shadow DOM. In this mode, the styles of the component will be injected into `this.$root.$options.shadowRoot` instead of the document head.
76+
编译用于 Shadow DOM 内部的组件。在该模式下,组件的样式会被注入到 `this.$root.$options.shadowRoot`,而不是文档的 head 部分。

0 commit comments

Comments
 (0)