How to use vite-plugin-dts in a project
Closed this issue · 4 comments
I haven't practiced it before, and before I was going to manually expose the component *.d.ts directly (because I didn't find that Vue2.6 has too good best practices), but vite-plugin-dts should work out of the box in Vue 2.7 and Vue3, you can try adding directly to the vite plugin option.
rootDir
problem. It seems that he thinks that the src/index.ts
source code is not in the playground
, maybe you can try adding tsconfig.json
to the playground
directory and include src/**
, I should update this repository when I have time, or you can PR.
I have already resolved the issue, but the plugin does not support 2.6. For 2.6, you can choose to upgrade to 2.7 or manually write the .d.ts file.Thank you for bringing up the issue. I think I can close it now.