Unknown file extension ".tsx"
talentlessguy opened this issue · comments
v1rtl commented
When trying to run node --loader=esbuild-node-loader index.test.tsx
I get this error:
TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".tsx" for /home/v1rtl/Coding/use-onboard/tests/index.test.tsx
my tsconfig:
{
"include": ["src"],
"compilerOptions": {
"module": "ESNext",
"target": "ES2019",
"moduleResolution": "node",
"esModuleInterop": true,
"isolatedModules": true,
"preserveSymlinks": true,
"noEmit": true,
"declaration": true,
"declarationDir": "dist",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"jsx": "react",
"allowSyntheticDefaultImports": true,
"strict": true,
"noFallthroughCasesInSwitch": true
},
"exclude": ["node_modules"]
}
Anthony Fu commented
What's the use case of tsx in node?
Anthony Fu commented
SSR without bundling? 👀 Alright then, maybe you can give it a try with a PR? Thanks