Skip to content

Commit d5b735a

Browse files
committed
fix: update Node version requirement in package.json and enhance README for clarity
1 parent 1ea6fb8 commit d5b735a

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,6 @@
5555
],
5656
"packageManager": "pnpm@10.9.0",
5757
"engines": {
58-
"node": ">=22.0.0"
58+
"node": ">=20.6.0"
5959
}
6060
}

readme.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Solid Register
22

3-
Node loader for compiling JSX/TSX files using Solid's compiler.
3+
Node loader for compiling JSX/TSX files using Solid's compiler. Uses [Node's Module Customization Hooks](https://nodejs.org/api/module.html#customization-hooks) to register the loader for `.jsx` and `.tsx` files.
4+
5+
Requires Node `>=20.6.0`.
46

57
## Usage
68

@@ -24,6 +26,11 @@ Also requires for the DOM api to be mocked with `jsdom` or similar.
2426
node --conditions=browser --import=solid-register/client ./index.tsx
2527
```
2628

29+
## TypeScript
30+
31+
This loader only handles the compilation of `.jsx`/`.tsx` files.\
32+
For `.ts` files you can use [`--experimental-strip-types`](https://nodejs.org/docs/v22.15.0/api/typescript.html#type-stripping), [`tsx`](https://github.com/privatenumber/tsx) or [`ts-node`](https://www.npmjs.com/package/ts-node).
33+
2734
## Example
2835

2936
See the [tests](./tests) folder for a client/ssr code example\

0 commit comments

Comments
 (0)