unplugin / unplugin-vue-components

📲 On-demand components auto importing for Vue
https://www.npmjs.com/package/unplugin-vue-components
MIT License
3.65k stars 341 forks source link

[BUG]issue of ElementUiResolver, Failed to resolve import "element-ui/lib/image-viewer" #745

Open wangermaizi opened 3 months ago

wangermaizi commented 3 months ago

Clear and concise description of the problem

I'm having some issues with ElementUiResolver, When I want to import the image preview component el-image-viewer in element, it says that the import failed and the file cannot be found using version is "element-ui": "^2.15.14", "vue": "^2.7.16", "unplugin-vue-components": "^0.22.12", "vite": "5.1.4", my import methods is components: { 'el-image-viewer':()=>import('element-ui/packages/image/src/image-viewer.vue') }, image

Suggested solution

ElementUiResolver should be support el-image-viewer component

Alternative

No response

Additional context

No response

Validations

wangermaizi commented 3 months ago

When I comment out the import component, I get another error components: { // 'el-image-viewer':()=>import('element-ui/packages/image/src/image-viewer.vue') } image