Skip to content

--deploy-url will have no effect on assets paths #4517

Description

Please provide us with the following information:

Versions.

Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the result here:
@angular/cli: 1.0.0-beta.30 node: 7.5.0 os: win32 x64 @angular/common: 2.4.6 @angular/compiler: 2.4.6 @angular/core: 2.4.6 @angular/forms: 2.4.6 @angular/http: 2.4.6 @angular/platform-browser: 2.4.6 @angular/platform-browser-dynamic: 2.4.6 @angular/router: 3.4.6 @angular/cli: 1.0.0-beta.30 @angular/compiler-cli: 2.4.6

Repro steps.

Was this an app that wasn't created using the CLI? What change did you do on your code? etc.

  • create app with the cli
  • use img src="assets/logo.png" in a template
  • ng build -d mysubfolder -bh mysubfolder
    copy the content of the dist to "htdocs/mysubfolder" on any webserver or use
    app.use('/mysubfolder', express.static(path.join(__dirname, angularDist))); on a node server.

The log given by the failure.

Normally this include a stack trace and some more information.

404 on all assets because it will ignore base href or deploy url and just use GET /assets/logo.png

Mention any other details that might be useful.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1Impacts a large percentage of users; if a workaround exists it is partial or overly painfultype: bug/fix

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions