Skip to content

TS solution logic prevents extending from another tsconfig in tsconfig.base.json #32134

@danewilson

Description

@danewilson

Current Behavior

Adding "extends" to tsconfig.base.json to extend another tsconfig in a TS solution workspace results in Nx assuming the workspace uses tsconfig paths instead.

Expected Behavior

Adding "extends" to tsconfig.base.json should have no effect on how Nx treats the workspace.

GitHub Repo

https://github.com/danewilson/nx-bugs

Steps to Reproduce

  1. Add "extends": "@tsconfig/strictest/tsconfig.json" to tsconfig.base.json
  2. Run nx build api and observe the log message which indicates Nx is treating the workspace as using tsconfig paths: tsconfig-paths-webpack-plugin: Found no baseUrl in tsconfig.json, not applying tsconfig-paths-webpack-plugin

Nx Report

Node           : 24.4.1
OS             : darwin-arm64
Native Target  : aarch64-macos
yarn           : 1.22.22

nx (global)        : 21.3.7
nx                 : 21.3.8
@nx/js             : 21.3.8
@nx/jest           : 21.3.8
@nx/eslint         : 21.3.8
@nx/workspace      : 21.3.8
@nx/devkit         : 21.3.8
@nx/eslint-plugin  : 21.3.8
@nx/nest           : 21.3.8
@nx/node           : 21.3.8
@nx/web            : 21.3.8
@nx/webpack        : 21.3.8
typescript         : 5.8.3
---------------------------------------
Registered Plugins:
@nx/js/typescript
@nx/webpack/plugin
@nx/eslint/plugin
@nx/jest/plugin
---------------------------------------
Cache Usage: 99.30 KB / 92.64 GB

Failure Logs

Package Manager Version

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

We would like to have the option of extending from another tsconfig file in tsconfig.base.json. For some reason this logic assumes you are not using the TS solution if tsconfig.base.json has any top-level keys other than compilerOptions. This seems like an odd assumption, and it prevents extending from other tsconfigs, such as these.

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions