Skip to content

Commit 59aba31

Browse files
committed
Replace custom loader with @node-loaders/tsx
We need a loader to load our JSX test file. We currently use a local script, but there are several packages that do this. We don’t need to maintain our own. This replaces our custom loader with `@nodejs-loaders/tsx` by the Node.js team.
1 parent ad7f37f commit 59aba31

File tree

2 files changed

+3
-92
lines changed

2 files changed

+3
-92
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@
6262
},
6363
"description": "React component to render markdown",
6464
"devDependencies": {
65+
"@nodejs-loaders/tsx": "^1.0.0",
6566
"@testing-library/react": "^16.0.0",
6667
"@types/node": "^22.0.0",
6768
"@types/react": "^19.0.0",
6869
"@types/react-dom": "^19.0.0",
6970
"c8": "^10.0.0",
7071
"concat-stream": "^2.0.0",
71-
"esbuild": "^0.25.0",
7272
"eslint-plugin-react": "^7.0.0",
7373
"global-jsdom": "^26.0.0",
7474
"prettier": "^3.0.0",
@@ -133,8 +133,8 @@
133133
"scripts": {
134134
"build": "tsc --build --clean && tsc --build && type-coverage",
135135
"format": "remark --frail --output --quiet -- . && prettier --log-level warn --write -- . && xo --fix",
136-
"test-api": "node --conditions development --experimental-loader=./script/load-jsx.js --no-warnings test.jsx",
137-
"test-coverage": "c8 --100 --exclude script/ --reporter lcov -- npm run test-api",
136+
"test-api": "node --conditions development --experimental-loader=@nodejs-loaders/tsx --no-warnings test.jsx",
137+
"test-coverage": "c8 --100 --reporter lcov -- npm run test-api",
138138
"test": "npm run build && npm run format && npm run test-coverage"
139139
},
140140
"sideEffects": false,

script/load-jsx.js

Lines changed: 0 additions & 89 deletions
This file was deleted.

0 commit comments

Comments
 (0)