Open 15831434134 opened 1 month ago
代码打包后,报错 xx.confirm is not function
vite 配置: import Components from 'unplugin-vue-components/vite' import { AntDesignVueResolver } from 'unplugin-vue-components/resolvers' plugins: [ ... Components({ resolvers: [AntDesignVueResolver({ resolveIcons: true })], }),
],
在本地运行没问题,打包部署后 报错 xx.confirm is not function 是什么原因 ?
"ant-design-vue": "^3.2.15", "unplugin-vue-components": "^0.22.9",
浏览器
yarn
当换成 import Modal from 'ant-design-vue/lib/modal' 这种引用方式打包后就正确识别Modal.confirm
Describe the bug
代码打包后,报错 xx.confirm is not function
vite 配置: import Components from 'unplugin-vue-components/vite' import { AntDesignVueResolver } from 'unplugin-vue-components/resolvers' plugins: [ ... Components({ resolvers: [AntDesignVueResolver({ resolveIcons: true })], }),
],
在本地运行没问题,打包部署后 报错 xx.confirm is not function 是什么原因 ?
Reproduction
"ant-design-vue": "^3.2.15", "unplugin-vue-components": "^0.22.9",
System Info
Used Package Manager
yarn
Validations