Skip to content

"start_url" in manifest file is not updated by a build with --baseHrefΒ #15092

@pacoita

Description

@pacoita

🐞 Bug report

Command (mark with an x)

- [ ] new
- [X] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Is this a regression?

No

Description

I have a brand new Angular project where I added PWA features via the add schematic ng add angular/pwa. In the web manifest file the "start_url" property is set to "/" by default.

If I run a PROD build changing the baseHref (ng build --prod --baseHref "/myDemo/"), the asset URLs in the ngsw.json file are correctly update, but not the "start_url" property in the manifest file. It must be updated manually.

πŸ”¬ Minimal Reproduction

  1. Create a new Angular app: ng new myDemo
  2. Add PWA features: ng add @angular/pwa
  3. Make a prod build using baseHref option: ng build --prod --baseHref "/myDemo/"

πŸ”₯ Exception or Error

The manifest.webmanifest file is copied in the dist folder, but its start_url property does not reflect the value used for the baseHref option.

🌍 Your Environment


Angular CLI: 8.1.1
Node: 12.3.1
OS: darwin x64
Angular: 8.2.0-next.1
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router, service-worker

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.801.1
@angular-devkit/build-angular     0.801.1
@angular-devkit/build-optimizer   0.801.1
@angular-devkit/build-webpack     0.801.1
@angular-devkit/core              8.1.1
@angular-devkit/schematics        8.1.1
@angular/cli                      8.1.1
@angular/pwa                      0.801.1
@ngtools/webpack                  8.1.1
@schematics/angular               8.1.1
@schematics/update                0.801.1
rxjs                              6.5.2
typescript                        3.4.5
webpack                           4.35.2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions