You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 #2854).
Better yet, is that using a loader, like Jest does in CJS mode with a require hook. Is that Vite can selectively decide to transform or not deep nested imports. So that problem packages imported deep down in the stack that otherwise work correctly when fully bundled can also work in Vitest without requiring to manually add to deps.inline the entire chain of package leading to them.
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 insidenode_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 #2854).
Suggested solution
Support Node.js loaders
Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: