-
Notifications
You must be signed in to change notification settings - Fork 918
[docs][zh] update #1305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[docs][zh] update #1305
Conversation
docs/zh/guide/pre-processors.md
Outdated
@@ -172,6 +172,23 @@ npm install -D babel-core babel-loader | |||
|
|||
Babel 的配置可以通过 `.babelrc` 或 `babel-loader` 选项来完成。 | |||
|
|||
### 排除 node_modules | |||
|
|||
`exclude: /node_modules/` 在运用于 `.js` 文件的 JS 转译规则 (例如 `babel-loader`) 中是蛮常见的。鉴于 v15 中的推导变化,如果你导入一个 `node_modules` 内的 Vue 单文件组件,它的 `<script>` 部分在转译时将会被排除在外。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
应用?
docs/zh/guide/pre-processors.md
Outdated
|
||
`exclude: /node_modules/` 在运用于 `.js` 文件的 JS 转译规则 (例如 `babel-loader`) 中是蛮常见的。鉴于 v15 中的推导变化,如果你导入一个 `node_modules` 内的 Vue 单文件组件,它的 `<script>` 部分在转译时将会被排除在外。 | ||
|
||
为了确保 JS 的转译应用到 `node_modules` 的 Vue 单文件组件,你需要通过替换使用一个排除函数将其设为白名单: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
替换
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
将它们加入白名单
docs/zh/migrating.md
Outdated
|
||
`exclude: /node_modules/` 在运用于 `.js` 文件的 JS 转译规则 (例如 `babel-loader`) 中是蛮常见的。鉴于 v15 中的推导变化,如果你导入一个 `node_modules` 内的 Vue 单文件组件,它的 `<script>` 部分在转译时将会被排除在外。 | ||
|
||
为了确保 JS 的转译应用到 `node_modules` 的 Vue 单文件组件,你需要通过替换使用一个排除函数将其设为白名单: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上
ref: 1204381...544f08f