signals: signals-react: Wrong import path in dist/signals.d.ts causing TypeScript errors
Hi,
we’ve discoverd an issue in dist/signals.d.ts that is causing TypeScript errors when building our app. It contains the following line:
import { useSignal, useComputed, useSignalEffect } from "../runtime/src/index";
That causes the source file ../runtime/src/index
to be included by the TypeScript compiler when building our app causing the TypeScript errors. If I manually change the import path from src
to dist
it works fine
About this issue
- Original URL
- State: closed
- Created 7 months ago
- Reactions: 1
- Comments: 19 (13 by maintainers)
TS makes this a bit sketchy, but we (in the Preact org) generally prefer to ship the source files alongside built.
I’m not quite sure what you’re referring to, but in any case, best way to get an answer is to clone & try out whatever you’re after. I may have done a fair bit with Microbundle but my memory of its behavior isn’t perfect.
It doesn’t:
And since src/index isn’t a .d.ts file, it goes boom.