🔎 Search Terms
extends plugins, compilerOptions.plugins extends, plugins not inherited, tsconfig extends inheritance, showConfig plugins
🕗 Version & Regression Information
⏯ Playground Link
No response
💻 Code
tsconfig.base.json:
{ "compilerOptions": { "plugins": [{ "name": "my-plugin" }] } }
tsconfig.json:
{ "extends": "./tsconfig.base.json", "compilerOptions": { "module": "nodenext" } }
Then run tsc -p . --showConfig
🙁 Actual behavior
compilerOptions.plugins is absent from the resulting config. A plugins array declared only in a base config never reaches ParsedCommandLine.Raw, it survives only if the leaf tsconfig redeclares it.
🙂 Expected behavior
plugins is inherited from the base config, as with any other compilerOptions entry the child doesn't override (6.0.3 behaviour).
Additional information about the issue
Cause
plugins is the only declared compiler option with no field on core.CompilerOptions, it's carried purely as raw JSON. So mergeCompilerOptions never brings it across, and applyExtendedConfig's raw-JSON merge only handles include/exclude/files/contentMappers/compileOnSave.
Possibly related
root-level watchOptions looks like the same issue.
Fix
I have a fix with tests ready and am happy to open a PR.
🔎 Search Terms
extends plugins, compilerOptions.plugins extends, plugins not inherited, tsconfig extends inheritance, showConfig plugins
🕗 Version & Regression Information
⏯ Playground Link
No response
💻 Code
tsconfig.base.json:
{ "compilerOptions": { "plugins": [{ "name": "my-plugin" }] } }tsconfig.json:
{ "extends": "./tsconfig.base.json", "compilerOptions": { "module": "nodenext" } }Then run
tsc -p . --showConfig🙁 Actual behavior
compilerOptions.pluginsis absent from the resulting config. A plugins array declared only in a base config never reachesParsedCommandLine.Raw, it survives only if the leaftsconfigredeclares it.🙂 Expected behavior
pluginsis inherited from the base config, as with any othercompilerOptionsentry the child doesn't override (6.0.3 behaviour).Additional information about the issue
Cause
pluginsis the only declared compiler option with no field oncore.CompilerOptions, it's carried purely as raw JSON. SomergeCompilerOptionsnever brings it across, andapplyExtendedConfig's raw-JSON merge only handlesinclude/exclude/files/contentMappers/compileOnSave.Possibly related
root-level
watchOptionslooks like the same issue.Fix
I have a fix with tests ready and am happy to open a PR.