vitest-dev / vitest-dev/vitest
New pool "node-loader"
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 17.1k
- Forks
- 2k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 94
Description
Clear and concise description of the problem
Node.js supports experimental loaders to transform code and resolve import paths before executing code.
We currently support deps.registerNodeLoader option, but it only transforms imports inside node_modules packages, and it doesn't work in > Node.js 20 because of an API change.
Supporting loaders makes it easier to test 100% compatible Node.js applications (we don't need to reimplement CJS/ESM for https://github.com/vitest-dev/vitest/pull/2854).
Suggested solution
Support Node.js loaders
Alternative
No response
Additional context
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the existing deps.registerNodeLoader entry point and read the linked Node.js experimental loaders documentation. Trace its current handling of imports inside node_modules and its behavior on Node.js versions above 20; done means supported loaders can transform code and resolve import paths for compatible applications.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- testing, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100