Build a component that uses a child component method
Version
5.0.0
Reproduction link
https://github.com/gwen1230/test-lib
Steps to reproduce
Run : yarn build
What is expected?
Correctly build App.vue
What is actually happening?
When i executed rollup -c i have this error : [!] (plugin rpt2) Error: C:/Users/gleneindre/Documents/Projets/test/test-lib/src/App.vue?rollup-plugin-vue=script.ts(16,40): semantic error TS2339: Property 'print' does not exist on type 'Vue'.
I think it's because i have this shim-vue.d.ts :
declare module '*.vue' {
import Vue from 'vue';
export default Vue;
}
So I don't know how to build a project like this without cast components to any...
If i create a TestComponent.vue.d.ts next to TestComponent.vue, it works... But i don't know how to create this file during build and remove it after
Using useTsconfigDeclarationDir: true in your typescript plugin should make the job.