Skip to content

Angular-cli 6 and base-href no longer supported? #10447

@ghost

Description

Versions

Angular CLI: 6.0.0-rc.5
Node: 9.11.1
OS: win32 x64
Angular: 6.0.0-rc.5
... animations, cli, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.5.7
@angular-devkit/build-angular     0.5.7
@angular-devkit/build-optimizer   0.5.7
@angular-devkit/core              0.5.7
@angular-devkit/schematics        0.5.7
@ngtools/json-schema              1.1.0
@ngtools/webpack                  6.0.0-rc.5
@schematics/angular               0.5.7
@schematics/update                0.5.7
rxjs                              6.0.0-uncanny-rc.7
typescript                        2.7.2
webpack                           4.5.0

Repro steps

  • change index.html e.g. to base href="/v2"
  • ng serve -bh /v2/ or ng serve --base-href /v2/
  • in angular.json: "styles": ["node_modules/[at]fortawesome/fontawesome-free-webfonts/scss/fontawesome.scss",....

Observed behavior

option -bh or --base-href is no longer supported
without this option e.g. fonts will not be loaded correctly if a link including the base-href is loaded in the browser:
GET http://localhost:4200/v2/fa-solid-900.woff net::ERR_ABORTED
if i type just "http://localhost:4200" without any base-href it will redirect to /v2 but the ressources will be loaded.

Desired behavior

What is the alternative implementation in angular6?

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