Closed as not planned
Description
🔎 Search Terms
jsconfig resolution reference
🕗 Version & Regression Information
- The issue was there for TypeScript (tsconfig.json) in 3.9.10
- The issue was fixed on the TypeScript (tsconfig.json) (at least) in 4.0.8
- The issue was always there for JavaScript (jsconfig.json)
⏯ Playground Link
No response
💻 Code
Minimal reproduction project
File tree
This is the file tree of the MRP.
.
├── javascript
│ ├── browser.js
│ ├── jsconfig.browser.json
│ ├── jsconfig.json
│ ├── jsconfig.node.json
│ └── node.js
└── typescript
├── browser.ts
├── node.ts
├── tsconfig.browser.json
├── tsconfig.json
└── tsconfig.node.json
Files
// javascript/jsconfig.browser.json
{
"compilerOptions": {
"composite": true
},
"include": ["browser.js"]
}
// javascript/jsconfig.node.json
{
"compilerOptions": {
"composite": true
},
"include": ["node.js"]
}
// typescript/tsconfig.json
{
"references": [{ "path": "./tsconfig.node.json" }, { "path": "./tsconfig.browser.json" }]
}
// typescript/tsconfig.browser.json
{
"compilerOptions": {
"composite": true
},
"include": ["browser.ts"]
}
// typescript/tsconfig.node.json
{
"compilerOptions": {
"composite": true
},
"include": ["node.ts"]
}
🙁 Actual behavior
In the typescript directory:
browser.ts
resolves to usetsconfig.browser.json
node.ts
resolves to usetsconfig.node.json
In the javascript directory:
browser.js
resolves to usejsconfig.json
node.js
resolves to usejsconfig.json
(becausejsconfig.*.json
don't have"allowJs": true
by default.)
🙂 Expected behavior
In the typescript directory:
browser.ts
resolves to usetsconfig.browser.json
node.ts
resolves to usetsconfig.node.json
In the javascript directory:
browser.js
resolves to usejsconfig.browser.json
node.js
resolves to usejsconfig.node.json
Additional information about the issue
- It doesn't seem to matter that the file is called
jsconfig.json
ortsconfig.json
, it seems that it's the resolution of JavaScript config files that is broken.