如何阻止 vue cli3 build 在我的 chunk-vendors.js 文件中包含 vue.js.min?

How can I stop vue cli3 build from including vue.js.min in my chunk-vendors.js file?

我从头开始,使用默认的 vue 创建项目,使用 cli 3。一切都很好,但是我注意到 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.