Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support extend angularCompilerOptions in tsconfig from absolute tsconfig #36715

Closed
splincode opened this issue Apr 20, 2020 · 3 comments
Closed

Support extend angularCompilerOptions in tsconfig from absolute tsconfig #36715

splincode opened this issue Apr 20, 2020 · 3 comments

Comments

@splincode
Copy link
Contributor

@splincode splincode commented Apr 20, 2020

🐞 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

@ngbot ngbot bot added this to the needsTriage milestone Apr 20, 2020
@alan-agius4
Copy link
Contributor

@alan-agius4 alan-agius4 commented Apr 20, 2020

@splincode
Copy link
Contributor Author

@splincode splincode commented Apr 20, 2020

@alan-agius4 Glad to hear that!

@alxhub alxhub added the feature label May 26, 2020
@ngbot ngbot bot removed this from the needsTriage milestone May 26, 2020
@ngbot ngbot bot added this to the Backlog milestone May 26, 2020
alan-agius4 added a commit to alan-agius4/angular that referenced this issue Mar 1, 2021
alan-agius4 added a commit to alan-agius4/angular that referenced this issue Mar 1, 2021
alan-agius4 added a commit to alan-agius4/angular that referenced this issue Mar 1, 2021
zarend added a commit that referenced this issue Mar 1, 2021
@angular-automatic-lock-bot
Copy link

@angular-automatic-lock-bot angular-automatic-lock-bot bot commented Mar 14, 2021

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Mar 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

4 participants