wheatjs / vite-plugin-vue-type-imports

Import types in Vue SFC for defineProps
223 stars 16 forks source link

v0.2.1 breaks imports in vue3 ts component #29

Closed mikouaji closed 1 year ago

mikouaji commented 1 year ago

After upgrading to v0.2.1 every component that makes use of the plugin has broken imports. I don't know what exactly is responsible for this behavior, there are many other plugins in the project. If you want to I can try to prepare a project that reproduces the problem when I have a bit of free time.

Reverting to v0.2.0 fixes the problem.

Zolyn commented 1 year ago

Can you provide a reproduction link/repo?

mikouaji commented 1 year ago

I'll try making one over the weekend

ppierre commented 1 year ago

https://github.com/ppierre/test-bug-import-plugin-vue-type-import

runtime-core.esm-bundler.js:38 [Vue warn]: Failed to resolve component: HeartComp

Just downgrading in the packages.json"solve" the problem:

-    "vite-plugin-vue-type-imports": "0.2.1"
+    "vite-plugin-vue-type-imports": "0.2.0"

Sorry that I can't be more helpfull this plugin is realy usefull. But whitout any error trace I don't know where to look.

Zolyn commented 1 year ago

It will be fixed in the next release.

Zolyn commented 1 year ago

Should be fixed in v0.2.2

mikouaji commented 1 year ago

Updating to 0.2.2 seems to work OK in my case