SolidJS + Typescript

After trying to use solid with ts, I have found out that ts is still trying to use react for jsx. How can I fix this?
// src/Button.tsx
var Button = () => {
console.log("Hello from button component!");
return /* @__PURE__ */ React.createElement(React.Fragment, null);
};
// src/Button.tsx
var Button = () => {
console.log("Hello from button component!");
return /* @__PURE__ */ React.createElement(React.Fragment, null);
};
4 Replies
TaQuanMinhLong
TaQuanMinhLong2mo ago
What tool did you use to build? Vite or something else? Bun?
SCsupercraft
SCsupercraftOP2mo ago
tsc
TaQuanMinhLong
TaQuanMinhLong2mo ago
use something that compiles solidjs tsx instead, like babel or esbuild (not really recommended) with solid plugin
SCsupercraft
SCsupercraftOP2mo ago
ok, thanks
Want results from more Discord servers?
Add your server