我从头开始,使用 cli 3 从 vue 中默认创建项目。一切都很好,但是我注意到 chunk-vendors.js 文件包含 vue.js.min。我不想包含该文件,如何告诉 vue 不要将其包含在生产版本中?
最佳答案
如果您想将 Vue 排除在捆绑之外,请使用 library build target .
In lib mode, Vue is externalized. This means the bundle will not bundle Vue even if your code imports Vue. If the lib is used via a bundler, it will attempt to load Vue as a dependency through the bundler; otherwise, it falls back to a global Vue variable.
关于vue.js - 如何阻止 vue cli3 构建将 vue.js.min 包含在我的 chunk-vendors.js 文件中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52393460/