Skip to content

Instantly share code, notes, and snippets.

@lil5
Created September 12, 2023 08:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lil5/f2163f18ba67ae51a7f67a329294ca4b to your computer and use it in GitHub Desktop.
Save lil5/f2163f18ba67ae51a7f67a329294ca4b to your computer and use it in GitHub Desktop.
Working tsconfig for nodejs
{
"type": "module",
"main": "./src/app.ts",
"scripts": {
"dev": "node --experimental-specifier-resolution=node --loader ts-node/esm src/app.ts"
},
"dependencies": {},
"devDependencies": {
"@types/node": "^20.6.0",
"ts-node": "^10.9.1",
"tslib": "^2.6.2",
"typescript": "^5.2.2"
}
}
{
"compilerOptions": {
"esModuleInterop": true,
"module": "NodeNext",
"moduleResolution": "NodeNext",
"target": "ES2020",
"sourceMap": true,
"outDir": "dist"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment