Skip to content

compilerOptions.plugins is not inherited through tsconfig "extends" #63975

Description

@vickvu

🔎 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocsThe issue relates to how you learn TypeScript

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions