{"_id":"@remix-run/node-tsx","_rev":"3-2495a8efbe21f825ee085897150cc264","name":"@remix-run/node-tsx","dist-tags":{"latest":"0.1.1"},"versions":{"0.0.0":{"name":"@remix-run/node-tsx","version":"0.0.0","license":"MIT","_id":"@remix-run/node-tsx@0.0.0","maintainers":[{"name":"mjackson","email":"mjijackson+npm@gmail.com"}],"homepage":"https://github.com/remix-run/remix#readme","bugs":{"url":"https://github.com/remix-run/remix/issues"},"dist":{"shasum":"bbe7f4f2a5202533b40baf6723aa860347bf162c","tarball":"https://registry.npmjs.org/@remix-run/node-tsx/-/node-tsx-0.0.0.tgz","fileCount":2,"integrity":"sha512-T2wMtUagNaSZt6kDwHUTZtiatbu4YlEXUamw4h2Q52N1C+g+Kngcrbi5iUC5ZvZ5CU92xcqsWGFgu0keZ+jwuw==","signatures":[{"sig":"MEUCIQCDPGmzQ1OUDORi2sKORC8HT7B5CiSyJnZaih9UlkoMIAIgRBqkzXznOYW0TlEg/iXkAkdDidwMZUh33dtdSy2lXE4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":463},"_npmUser":{"name":"mjackson","email":"mjijackson+npm@gmail.com"},"repository":{"url":"git+https://github.com/remix-run/remix.git","type":"git","directory":"packages/node-tsx"},"_npmVersion":"11.12.1","description":"Placeholder package for Remix CI/OIDC setup","directories":{},"_nodeVersion":"24.15.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/node-tsx_0.0.0_1779246480511_0.6814221078588008","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@remix-run/node-tsx","version":"0.1.0","keywords":["remix","node","jsx","tsx","loader","test"],"author":{"name":"Michael Jackson","email":"mjjackson@gmail.com"},"license":"MIT","_id":"@remix-run/node-tsx@0.1.0","maintainers":[{"name":"mjackson","email":"mjijackson+npm@gmail.com"}],"homepage":"https://github.com/remix-run/remix/tree/main/packages/node-tsx#readme","bugs":{"url":"https://github.com/remix-run/remix/issues"},"dist":{"shasum":"04c21bc6e820c17268f9989f11653cb10bada147","tarball":"https://registry.npmjs.org/@remix-run/node-tsx/-/node-tsx-0.1.0.tgz","fileCount":35,"integrity":"sha512-HkKtXl3verVfWP7c9Iu0U/5ra1GdOSlNAV+uqouA9FvOnaONy4FECMaPxLFynK+bG4Zh2zefjdrBE+0EjEeJFg==","signatures":[{"sig":"MEUCIALMiM7Gs4KXbU86T1B+8k5NJyqJIB5CiRr3LVB/1qaiAiEAipM+D0Hj/JKV6b9MHXVDwb4U/b48fqEficmHX8IEGxM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@remix-run%2fnode-tsx@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":40186},"type":"module","_from":"file:remix-run-node-tsx-0.1.0.tgz","engines":{"node":">=24.3.0"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./load-module":{"types":"./dist/load-module.d.ts","default":"./dist/load-module.js"},"./package.json":"./package.json"},"scripts":{"test":"node --disable-warning=ExperimentalWarning --test './src/**/*.test.ts'","build":"tsgo -p tsconfig.build.json","clean":"git clean -fdX","typecheck":"tsgo --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:ec0fc624-ddb1-43f1-80e8-49a07339c3b2"}},"_resolved":"/tmp/d07b431fba47d1b10a3c5927d2fecd58/remix-run-node-tsx-0.1.0.tgz","_integrity":"sha512-HkKtXl3verVfWP7c9Iu0U/5ra1GdOSlNAV+uqouA9FvOnaONy4FECMaPxLFynK+bG4Zh2zefjdrBE+0EjEeJFg==","repository":{"url":"git+https://github.com/remix-run/remix.git","type":"git","directory":"packages/node-tsx"},"_npmVersion":"11.12.1","description":"Run Node.js with TypeScript and JSX syntax support","directories":{},"_nodeVersion":"24.15.0","dependencies":{"get-tsconfig":"^4.13.6","oxc-transform":"^0.121.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/node":"^24.6.0","@typescript/native-preview":"7.0.0-dev.20251125.1"},"_npmOperationalInternal":{"tmp":"tmp/node-tsx_0.1.0_1779247220824_0.8425701980356686","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@remix-run/node-tsx","version":"0.1.1","description":"Run Node.js with TypeScript and JSX syntax support","author":{"name":"Michael Jackson","email":"mjjackson@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/remix-run/remix.git","directory":"packages/node-tsx"},"homepage":"https://github.com/remix-run/remix/tree/main/packages/node-tsx#readme","type":"module","engines":{"node":">=24.3.0"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package.json":"./package.json","./load-module":{"types":"./dist/load-module.d.ts","default":"./dist/load-module.js"}},"dependencies":{"get-tsconfig":"^4.13.6","oxc-transform":"^0.121.0"},"devDependencies":{"@types/node":"^24.6.0","@typescript/native-preview":"7.0.0-dev.20251125.1"},"keywords":["remix","node","jsx","tsx","loader","test"],"scripts":{"build":"tsgo -p tsconfig.build.json","clean":"git clean -fdX","test":"node --disable-warning=ExperimentalWarning --test './src/**/*.test.ts'","typecheck":"tsgo --noEmit"},"_id":"@remix-run/node-tsx@0.1.1","bugs":{"url":"https://github.com/remix-run/remix/issues"},"_integrity":"sha512-k9Oi2gML1E7c1PLj+kX+Hsumkjg9tpps7+ufpy7ugsiRTe6fDfZOyEmlYOIkfR2K2Nf8D33+967EMlInm9Nvvg==","_resolved":"/tmp/42d0db44eac430cad9321b1026aae9d7/remix-run-node-tsx-0.1.1.tgz","_from":"file:remix-run-node-tsx-0.1.1.tgz","_nodeVersion":"24.15.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-k9Oi2gML1E7c1PLj+kX+Hsumkjg9tpps7+ufpy7ugsiRTe6fDfZOyEmlYOIkfR2K2Nf8D33+967EMlInm9Nvvg==","shasum":"0bb615eda1651a9bcfc0dc9f0cfe6e6b38d56ee7","tarball":"https://registry.npmjs.org/@remix-run/node-tsx/-/node-tsx-0.1.1.tgz","fileCount":35,"unpackedSize":40529,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@remix-run%2fnode-tsx@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGjaKjAHXkWW1VW+bOSeSskUZbZChQR9iq77RUIVQVl/AiEA31VcfN1rfs4qjYPBDnQhLZxjUo3y7uXhAGjQp21W1Xc="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:ec0fc624-ddb1-43f1-80e8-49a07339c3b2"}},"directories":{},"maintainers":[{"name":"mjackson","email":"mjijackson+npm@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/node-tsx_0.1.1_1779308180931_0.643857332668013"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-20T03:08:00.359Z","modified":"2026-05-20T20:16:21.430Z","0.0.0":"2026-05-20T03:08:00.642Z","0.1.0":"2026-05-20T03:20:21.016Z","0.1.1":"2026-05-20T20:16:21.100Z"},"bugs":{"url":"https://github.com/remix-run/remix/issues"},"author":{"name":"Michael Jackson","email":"mjjackson@gmail.com"},"license":"MIT","homepage":"https://github.com/remix-run/remix/tree/main/packages/node-tsx#readme","keywords":["remix","node","jsx","tsx","loader","test"],"repository":{"type":"git","url":"git+https://github.com/remix-run/remix.git","directory":"packages/node-tsx"},"description":"Run Node.js with TypeScript and JSX syntax support","maintainers":[{"name":"mjackson","email":"mjijackson+npm@gmail.com"}],"readme":"# node-tsx\n\nRun Node.js with TypeScript and JSX syntax support in `.ts`, `.tsx`, and `.jsx` files.\n\n`node-tsx` transforms supported source files before Node.js executes them, including\nTypeScript syntax that requires JavaScript code generation such as enums, runtime\nnamespaces, and parameter properties. JSX compiler options are read from the nearest\n`tsconfig.json` for each loaded file.\n\nThe loader does not type check, change Node.js module resolution, apply TypeScript\npath aliases, or downlevel JavaScript syntax for older runtimes.\n\n## Installation\n\n```sh\nnpm i remix\n```\n\n## Usage\n\nPass the `--import` flag to register the `remix/node-tsx` loader when executing `node`:\n\n```sh\nnode --import remix/node-tsx ./server.ts\n```\n\n### TypeScript configuration\n\nSince import resolution still follows Node.js, configure type checking to match native Node loading:\n\n```json\n{\n  \"compilerOptions\": {\n    \"module\": \"NodeNext\",\n    \"moduleResolution\": \"NodeNext\",\n    \"allowImportingTsExtensions\": true,\n    \"isolatedModules\": true,\n    \"verbatimModuleSyntax\": true,\n    \"rewriteRelativeImportExtensions\": true\n  }\n}\n```\n\n- [`module`](https://www.typescriptlang.org/tsconfig/#module) and [`moduleResolution`](https://www.typescriptlang.org/tsconfig/#moduleResolution) use `NodeNext` so TypeScript resolves modules the way Node does.\n- [`allowImportingTsExtensions`](https://www.typescriptlang.org/tsconfig/#allowImportingTsExtensions) allows source files to import `.ts` and `.tsx` modules directly.\n- [`isolatedModules`](https://www.typescriptlang.org/tsconfig/#isolatedModules) avoids patterns that require whole-program compilation, such as re-exporting a type without `export type`.\n- [`verbatimModuleSyntax`](https://www.typescriptlang.org/tsconfig/#verbatimModuleSyntax) requires type-only imports and exports to be marked so runtime imports are unambiguous.\n- [`rewriteRelativeImportExtensions`](https://www.typescriptlang.org/tsconfig/#rewriteRelativeImportExtensions) preserves a `tsc` emit path by rewriting relative `.ts` and `.tsx` imports to JavaScript extensions.\n\nDo not enable `erasableSyntaxOnly` if you want TypeScript to accept the same\ntransform-only syntax that `node-tsx` can execute.\n\n### Programmatic usage\n\n#### Registering the loader\n\nImport `remix/node-tsx` as a side effect to register the loader.\n\n```ts\nimport 'remix/node-tsx'\n```\n\n#### Loading a module with scoped JSX support\n\nLoad a module with TypeScript and JSX syntax support scoped to its import graph:\n\n```ts\nimport { loadModule } from 'remix/node-tsx/load-module'\n\nlet mod = await loadModule('./app/server.tsx', import.meta.url)\n```\n\n## Related Work\n\n- [Node.js Modules: Customization hooks](https://nodejs.org/api/module.html#customization-hooks)\n\n## License\n\nSee [LICENSE](https://github.com/remix-run/remix/blob/main/LICENSE)\n","readmeFilename":"README.md"}