Skip to content

Support extend angularCompilerOptions in tsconfig from absolute tsconfig #36715

@splincode

Description

@splincode

🐞 bug report

@alan-agius4 #22684

Is this a regression?

No

Description

I know that extends works if we use a config regarding our file system

tsconfig.angular.json

{
      "angularCompilerOptions": {
        "strictTemplates": true,
        "fullTemplateTypeCheck": true,
        "annotateForClosureCompiler": true,
        "strictInjectionParameters": true,
        "skipTemplateCodegen": false,
        "preserveWhitespaces": true,
        "skipMetadataEmit": false,
        "disableTypeScriptVersionCheck": true
    }
}

tsconfig.json

{
    "extends": "./tsconfig.angular.json",
    "compilerOptions": {
        "baseUrl": "./src",
        "module": "esnext",
        "target": "es2015",
        "outDir": "./dist/out-tsc",
        "lib": ["es2017", "es2018", "dom"]
    }
}

Works great

But If I put the config in a separate package

{
    "extends": "@my-company/tsconfig",
    "compilerOptions": {
        "baseUrl": "./src",
        "module": "esnext",
        "target": "es2015",
        "outDir": "./dist/out-tsc",
        "lib": ["es2017", "es2018", "dom"]
    }
}

Only inheritance compilerOptions works, but I expect angularCompilerOptions to be inherited too

🔬 Minimal Reproduction

$ npm i @angular-ru/tsconfig
{
    "extends": "@angular-ru/tsconfig",
    "compilerOptions": {
        "baseUrl": "./src",
        "module": "esnext",
        "target": "es2015",
        "outDir": "./dist/out-tsc",
        "lib": ["es2017", "es2018", "dom"]
    }
}
$ ng build

Works without angularCompilerOptions inherited properties

@alan-agius4 What do you think about this, is it a bug?

🌍 Your Environment

Angular Version:

Angular 8.2.14

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: compilerIssues related to `ngc`, Angular's template compilerfeatureLabel used to distinguish feature request from other issues

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions