alva icon indicating copy to clipboard operation
alva copied to clipboard

Index typing is not regarded as a component declaration

Open stevefan1999-personal opened this issue 5 years ago • 2 comments

Describe the bug You cannot use index.d.ts to declare your components. It loads but nothing is shown afterwards

To Reproduce

  1. Use webpack/rollup to generate index.js & index.d.ts.
  2. Connect the component in Alva

Expected behavior The components should be imported

Additional context It can be workarounded by using index.d.ts as a mere central export. Simply change the index.js to output.js and index.d.ts to output.d.ts respectively and replace index.d.ts to export output only:

export * from './output'

However since I'm using an external Webpack build, it is very counter-intuitive to me that I wasn't be able to use the index.d.ts generated.

stevefan1999-personal avatar Feb 02 '19 19:02 stevefan1999-personal

Hey @stevefan1999-personal, thanks for the bug report! Hm, I'm trying to reproduce the behaviour – could you share an example repo maybe? That would be awesome! Thanks, Tilman

tilmx avatar Feb 04 '19 22:02 tilmx

@tilmx here you go, I was doing something highly experimental so don't expect to fully reproduce it.

stevefan1999-personal avatar Feb 05 '19 07:02 stevefan1999-personal