react-markdown
react-markdown copied to clipboard
Replace custom loader with @node-loaders/tsx
Initial checklist
- [x] I read the support docs
- [x] I read the contributing guide
- [x] I agree to follow the code of conduct
- [x] I searched issues and discussions and couldn’t find anything or linked relevant results below
- [x] I made sure the docs are up to date
- [x] I included tests (or that’s not needed)
Description of changes
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.
Apparently this doesn’t work with all Node.js versions we support.
What's the different with using tsx itself?
OK, it seems the tsx in @node-loaders/tsx means for .tsx extension, not the tsx npm package...
tsx npm package's name is really confusing.