gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-03 06:44:24 25 4
gpt4 key购买 nike

我从头开始,使用cli 3从vue使用默认的创建项目。一切都很好,但是我注意到chunk-vendors.js文件包含vue.js.min。我不想包含该文件,如何告诉Vue在生产版本中不包含该文件?

最佳答案

如果要从 bundle 中排除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构建从在我的chunk-vendors.js文件中包含vue.js.min?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52393460/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com