-
-
Notifications
You must be signed in to change notification settings - Fork 353
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
vue使用cdn引入后,vant依赖无法被打包,components.d.ts文件中会自动删除vant组件 #664
vue使用cdn引入后,vant依赖无法被打包,components.d.ts文件中会自动删除vant组件 #664
Comments
需要一个可复现的 git 仓库 |
vite项目,安装vite-plugin-cdn-import和vant,使用vite-plugin-cdn-import引入vue的cdn。代码里面使用vant按需引入,打包时就会出现vant依赖丢失。猜测问题应该是vite-plugin-cdn-import和unplugin-vue-components执行顺序问题发生了冲突。 |
|
不好意思,我开始看错了,我看了下,稍微改变下 cdn plugin 的语法就 ok |
如何修改,大佬 |
@vivid05 我已经给 cdn 插件提了 pr,但是看着好久不维护了,你可以 fork 下来,照着我的修改改一下,就三行代码 https://github.com/MMF-FE/vite-plugin-cdn-import/pull/41/files |
我试过了,ok,你看下 vant 项目最终使用的 cdn 是不是修改后打包的文件, |
Describe the bug
vue使用cdn引入后,vant依赖无法被打包,components.d.ts文件中会自动删除vant组件
Reproduction
使用vite-plugin-cdn-import-async,将vue用cdn引入,打包时会自动删除vant
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: