oxc-node-loader
A Node.js loader that lets you run TypeScript files directly without a build step, transforming them on the fly using the fast oxc parser.
oxc-node-loader
This project lets you run TypeScript files directly in Node.js without needing a separate build step. Normally, you'd have to compile TypeScript into JavaScript first, then run it. This loader skips that hassle by transforming TypeScript on the fly.
Here's how it works: when you use the special flag --import ./oxc-register.js, you're telling Node to load this transformer before running your code. The transformer uses oxc (a fast JavaScript and TypeScript parser) to convert your TypeScript syntax into plain JavaScript that Node can understand. It happens invisibly in the background, so from your perspective you're just running a .ts file directly, the same way you'd run a .js file.
You'd use this if you're working on a TypeScript project and want to run scripts, tests, or utilities without maintaining a separate build pipeline. For example, a developer might run a one-off data migration script, a test file, or a utility without needing to invoke a bundler or TypeScript compiler explicitly. It's especially useful for rapid development and scripting where the overhead of traditional build tools feels like overkill.
The README is minimal and doesn't explain the full feature set, but the core idea is straightforward: it's a convenience tool for developers who want the ergonomics of running TypeScript files like you would JavaScript files in Node.
Where it fits
- Run a TypeScript script or utility directly with Node without a build pipeline.
- Execute TypeScript test files without invoking a separate compiler.
- Speed up rapid development by skipping bundler overhead for one-off scripts.