Skip to content

Build prod/Serve still succeeds even there is an invalid build tsConfig in angular.json #16176

@ahnpnl

Description

@ahnpnl

🐞 Bug report

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • xi18n
  • run
  • config
  • help
  • version
  • doc

Is this a regression?

Not that I'm aware of

Description

If there is a duplicate key tsConfig in build options and one of this key has invalid value. Build production or local dev server still works. Happens to both v8 and v9-rc.1.

I would expect build fails or local dev server fails to start. Or at least there should be a warning.

🔬 Minimal Reproduction

  • Clone the reproduce repo
  • Install dependencies with yarn.
  • Take a look at angular.json that there is a duplicate key tsConfig. One key has value tsconfig.app.json (this file exists in project) and the other key has value tsconfig-es5.app.json (this file doesn't exist in project).
  • Run ng build.
  • Observe that there is neither warning or error and build still succeeds.

🔥 Exception or Error

No error

🌍 Your Environment



Angular CLI: 9.0.0-rc.1
Node: 10.17.0
OS: win32 x64
Angular: 9.0.0-rc.1
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.900.0-rc.1
@angular-devkit/build-angular     0.900.0-rc.1
@angular-devkit/build-optimizer   0.900.0-rc.1
@angular-devkit/build-webpack     0.900.0-rc.1
@angular-devkit/core              9.0.0-rc.1
@angular-devkit/schematics        9.0.0-rc.1
@ngtools/webpack                  9.0.0-rc.1
@schematics/angular               9.0.0-rc.1
@schematics/update                0.900.0-rc.1
rxjs                              6.5.3
typescript                        3.6.4
webpack                           4.41.2

Anything else relevant?
N.A.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions