Skip to content
This repository was archived by the owner on Jan 18, 2022. It is now read-only.

Build a component that uses a child component method #335

Open
gwen1230 opened this issue Mar 25, 2020 · 2 comments
Open

Build a component that uses a child component method #335

gwen1230 opened this issue Mar 25, 2020 · 2 comments
Milestone

Comments

@gwen1230
Copy link

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...

@gwen1230
Copy link
Author

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

@lrembacz
Copy link

lrembacz commented Jun 6, 2020

Using useTsconfigDeclarationDir: true in your typescript plugin should make the job.

@znck znck added this to the Zero Issues milestone Oct 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants