Skip to content

Option "baseHref" is deprecated: Use the "baseHref" option in the browser builder instead. #19195

@prabh-62

Description

@prabh-62

🐞 Bug report

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • extract-i18n
  • run
  • config
  • help
  • version
  • doc

Is this a regression?

Description

Redundant warnings from Angular CLI when trying to start angular application in dev mode.

🔬 Minimal Reproduction

> npx @angular/cli@v11.0.0-rc.0 new web-applications --create-application=false --strict
> cd web-applications
> yarn ng generate application support-panel --routing --style css
  • Edit angular.json and add values for baseHref, deployUrl under ng serve(not ng build) so that the app is served over http://localhost:4200/support/ and not http://localhost:4200/
    "serve": {
          "builder": "@angular-devkit/build-angular:dev-server",
          "options": {
            "browserTarget": "support-panel:build",
            "baseHref": "/support/",
            "deployUrl": "/support/"
          },

baseHref_angular

  • > yarn ng serve --project support-panel

warnings_cli_baseHref

🔥 Exception or Error


Option "baseHref" is deprecated: Use the "baseHref" option in the browser builder instead.
Option "deployUrl" is deprecated: Use the "deployUrl" option in the browser builder instead.

🌍 Your Environment


$ ng version

Angular CLI: 11.0.0-rc.0
Node: 15.0.1
OS: darwin x64

Angular: 11.0.0-rc.0
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1100.0-rc.0
@angular-devkit/build-angular   0.1100.0-rc.0
@angular-devkit/core            11.0.0-rc.0
@angular-devkit/schematics      11.0.0-rc.0
@schematics/angular             11.0.0-rc.0
@schematics/update              0.1100.0-rc.0
rxjs                            6.6.3
typescript                      4.0.3
    
Done in 1.00s.

Anything else relevant?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions