jsconfig Not Picked Up When tsconfig is Present
See original GitHub issueFrom: https://github.com/Microsoft/vscode/issues/26550
TypeScript Version: 2.3.3
Repo
Create a folder that contains both a tsconfig.json
for ts files and a jsconfig.json
for js files
Expected behavior: Both projects are picked up
Actual behavior: Only the TSConfig is picked up
Issue Analytics
- State:
- Created 6 years ago
- Reactions:20
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Why does VSCode not pick up path aliases in tsconfig?
The tsconfig configuration will only apply to files matched by the "include" option and not excluded by the "exclude" option.
Read more >jsconfig.json Reference - Visual Studio Code
If no include attribute is present, then this defaults to including all files in the containing directory and subdirectories. When a include attribute...
Read more >Documentation - What is a tsconfig.json - TypeScript
The tsconfig.json file specifies the root files and the compiler options required to compile the project. JavaScript projects can use a jsconfig.json file ......
Read more >Javascript - vscode-docs
File Scope - no jsconfig.json: In this mode, JavaScript files opened in Visual Studio Code are treated as independent units. As long as...
Read more >tsconfig-paths - npm
Load node modules according to tsconfig paths, in run-time or via API. ... @returns the found path, or undefined if no path was...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have a large project written in Javascript that we want to migrate to TypeScript. The process will be slow and take a long time but meantime all import aliases are broken on javascript for this reason. It’d be nice if VSCode would implement aliases on both file types or at least fallback to
jsconfig.json
on .js files.Ya VSCode will ignore jsconfig.json when tsconfig.json is present. The way to make paths resolution (or aliases) work is to simply set
allowJs: true
in tsconfig.json and delete jsconfig.json as it won’t be used.See: https://github.com/Microsoft/vscode/issues/41890#issuecomment-364897596