Skip to content

Comment on (ab?)using Node module hooks to speed up development

Comments

With Typescript you could(prob still can) specify how JSX tags are translated, so you can get the regular data structure without React dependency.

sbjsOP

That's orthogonal, and in fact you probably would use TypeScript to translate JSX to JS when using this library. What this does is (a) provide a Node.js module hook to call your transpile function when it encounters TSX/JSX files, and (b) provide a Node.js module that lets you remap imports, including "react/jsx-runtime" if you want a different JSX implementation.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.