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
Labels
area: compiler Issues related to `ngc`, Angular's template compiler feature Issue that requests a new feature
Milestone

Comments

@splincode
Copy link
Contributor

🐞 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

@pkozlowski-opensource pkozlowski-opensource added the area: compiler Issues related to `ngc`, Angular's template compiler label Apr 20, 2020
@ngbot ngbot bot added this to the needsTriage milestone Apr 20, 2020
@alan-agius4
Copy link
Contributor

alan-agius4 commented Apr 20, 2020

@splincode
Copy link
Contributor Author

@alan-agius4 Glad to hear that!

@alxhub alxhub added the feature Issue that requests a new feature label May 26, 2020
@ngbot ngbot bot modified the milestones: needsTriage, Backlog May 26, 2020
zarend pushed a commit that referenced this issue Mar 1, 2021
@angular-automatic-lock-bot
Copy link

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.
Labels
area: compiler Issues related to `ngc`, Angular's template compiler feature Issue that requests a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants