I want to use a custom tsconfig named "tsconfig.custom.json" in VS Code, but it seems that it only recognizes tsconfig files named "tsconfig.json". Is there a way to change that?
As already mentioned in the comments, at the time of this writing, there isn't full support for tsconfig files named anything other than "tsconfig.json" in VS Code yet. See this issue on the VS Code GitHub repo: Allow to specify the tsconfig.json filename explicitly #12463. fun note: see the end of the thread to learn why you shouldn't pester project maintainers with non-constructive "me too" comments in their issue tickets :P
You can, however, at least get autocomplete for filling in fields by telling VS Code what JSON schema to use for the file. Use the json.schemas
setting like so:
"json.schemas": [
{
"fileMatch": [ "*tsconfig*.json" ],
"url": "http://json.schemastore.org/tsconfig",
}
],
Adjust the glob pattern as needed.
And if your top-level tsconfig is named tsconfig.json and it extends other tsconfigs not named "tsconfig.json", support for IntelliSense based on the inherited config settings should work fine (I'm pretty sure the reason is because that functionality is handled by ts-server and not directly by VS Code).
© 2022 - 2024 — McMap. All rights reserved.