pakholeung37 / vite-plugin-vue2-svg

load SVG files as Vue components, for Vue2.x only.
MIT License
19 stars 9 forks source link

not working with typescript #15

Closed neozo closed 1 year ago

neozo commented 1 year ago

i install the plugin with vite3.2 ,vue2.7 ,typescript4.7 and config it with demo,

but when running, show the error:

failed to load config from /xxxxx/vite.config.ts
error when starting dev server:
TypeError: (0 , import_vite_plugin_vue2_svg.default) is not a function

and IDEA show me an error reason:

TS2349: This expression is not callable.   Type 'typeof import("/xxx/node_modules/.pnpm/vite-plugin-vue2-svg@0.4.0_s72bufat24j4xi363kb5czieqe/node_modules/vite-plugin-vue2-svg/lib/index")' has no call signatures.