Describe the bug
Working with directives and TypeScript doesn't seem to be playing well together.
When importing a directive from a file, I get the error:
ReferenceError: <name> is not defined
I came across this issue: #569
Adding my Vite plugin as:
solidPlugin({ typescript: { onlyRemoveTypeImports: true } }),
then causes another issue: The requested module '/node_modules/.vite/deps/solid-js.js?v=dacde466' does not provide an export named 'Component'
Your Example Website or App
https://stackblitz.com/edit/solid-vite-sv6hn7?file=src/index.tsx
Steps to Reproduce the Bug or Issue
- Make a file for your directive.
- Import it and attach it.
- Open the console to see the error.
Expected behavior
The directive is recognised.
Screenshots or Videos
No response
Platform
- OS: macOs
- Browser: Chrome
- Version: 101.0.4951.64
Additional context
TypeScript also complains about:
'useFoo' is declared but its value is never read. ts(6133)
Describe the bug
Working with directives and TypeScript doesn't seem to be playing well together.
When importing a directive from a file, I get the error:
I came across this issue: #569
Adding my Vite plugin as:
then causes another issue:
The requested module '/node_modules/.vite/deps/solid-js.js?v=dacde466' does not provide an export named 'Component'Your Example Website or App
https://stackblitz.com/edit/solid-vite-sv6hn7?file=src/index.tsx
Steps to Reproduce the Bug or Issue
Expected behavior
The directive is recognised.
Screenshots or Videos
No response
Platform
Additional context
TypeScript also complains about: