Skip to content

Instantly share code, notes, and snippets.

@neves
Last active September 2, 2020 10:39
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 neves/05b17fce65cdc3c92010537a162b3c25 to your computer and use it in GitHub Desktop.
Save neves/05b17fce65cdc3c92010537a162b3c25 to your computer and use it in GitHub Desktop.

if import as recommended in https://www.npmjs.com/package/@tsconfig/recommended it gives the follow error: (treats tsconfig.json as a directory)

esbuild index.ts
tsconfig.json:2:13: error: Cannot read file "node_modules/@tsconfig/recommended/tsconfig.json/tsconfig.json": not a directory
  "extends": "@tsconfig/recommended/tsconfig.json"
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error

But with "extends": "@tsconfig/recommended" works!

Implemented here and broked here the order was changed.

function sum(a: number, b: number) {
return a + b
}
console.log(sum(10, 5))
{
"name": "esbuild-tsconfig-extends",
"version": "0.0.0",
"private": true,
"devDependencies": {
"@tsconfig/recommended": "^1.0.1",
"esbuild": "^0.6.28"
}
}
{
"extends": "@tsconfig/recommended/tsconfig.json"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment