You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to be able to specify an empty files array when extending another tsconfig.json file in order to override a files array specified in the base config.
Use Cases
I have a base configuration file that includes all typescript sources, including tests, as well as a config file for local development:
I then have a second configuration file for deployment builds that only includes sources. I also want to exclude the local config since an appropriate configuration file for the deployment environment is added by a downstream build step:
So I see now that this doesn't stop compilation and the output directory is as I expect. Maybe it would be nice to output a warning with a 0 exit code so that npm doesn't complain.
So a little bit more digging with this. A non-0 exit code from tsc, in this case, prevents me from composing commands with npm:
{
"script": {
"build": "npm run compile && npm run assemble && npm run deploy",
"compile": "tsc -p tsconfig.dist.json",
"assemble": "...",
"deploy": "..."
}
}
In a setup like this, npm halts execution when it encounters the non-0 exit code from tsc and so doesn't ever execute the assemble and deploy commands.
Search Terms
I have found the following closed bugs that are related but not quite the same:
TypeStrong/ts-loader#405
#12762
Suggestion
I would like to be able to specify an empty files array when extending another tsconfig.json file in order to override a files array specified in the base config.
Use Cases
I have a base configuration file that includes all typescript sources, including tests, as well as a config file for local development:
tsconfig.json
I then have a second configuration file for deployment builds that only includes sources. I also want to exclude the local config since an appropriate configuration file for the deployment environment is added by a downstream build step:
tsconfig.dist.json
However, attempting to compile using tsconfig.dist.json results in an error: tsconfig.dist.json:7:12 - error TS18002:
Checklist
My suggestion meets these guidelines:
The text was updated successfully, but these errors were encountered: