Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/zh/guide/build-targets.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@

::: tip 注意对 Vue 的依赖
在库模式中,Vue 是*外置的*。这意味着包中不会有 Vue,即便你在代码中导入了 Vue。如果这个库会通过一个打包器使用,它将尝试通过打包器以依赖的方式加载 Vue;否则就会回退到一个全局的 `Vue` 变量。

要避免此行为,可以在`build`命令中添加`--inline-vue`标志。
```
vue-cli-service build --target lib --inline-vue
```
:::


Expand Down