tsconfig.json is ignored
See original GitHub issueHi everyone,
I’ve just realized that tsconfig.json
is being ignored. How can I tell to esbuild
that we have a tsconfig file?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Why is the TypeScript compiler ignoring tsconfig.json?
json files are ignored. The presence of a tsconfig.json file in a directory indicates that the directory is the root of a TypeScript...
Read more >Allow tsconfig.json when input files are specified · Issue #27379
If no --project or -p option: Ignore tsconfig.json; Otherwise: Use the configuration file specified. All the options used in the command line ...
Read more >Documentation - What is a tsconfig.json - TypeScript
When input files are specified on the command line, tsconfig.json files are ignored. Examples. Example tsconfig.json files: Using the files property.
Read more >VS 15.6 ignores tsconfig.json and TypeScriptCompileBlocked
After updating to 15.6 it appears our tsconfig.json seems to be ignored (we are targeting Typescript 2.6). This results in that modules cannot...
Read more >TypeScript compiler compile all ignores tsconfig.json ...
The TypeScript compiler seems to be ignoring the tsconfig.json typeRoots option. With tsconfig.json in the folder /Volumes/saas-shipping/saas-shipping-ui/ ...
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 Free
Top 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
@linonetwo
Assuming you did
require('./tsconfig.json')
, then your error is because you’re using Node.js’s require to import a JSON with comments. Official JSON spec doesn’t support comments.Typescript has a custom JSON parser that supports comments. For your use-case, you can use
strip-json-comments
orjson5
:You can also read the raw tsconfig.json file with the building Typescript config reader API: