Skip to content

Angular 19 AngularAppEngine angular-app-engine-manifest.mjs needs to be edited when build with --base-href #30082

Closed as not planned
@regiss

Description

@regiss

Command

build

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

Good day,
we need to build our app with --base-href as we include it in legacy code
ng build --base-href /prefix/
We are running it in SSR and multi language setup - SSR 19.2.5 and using subPath
"en-CA": { "translation": "en.json", "subPath": "" }, "fr-CA": { "translation": "fr.json", "subPath": "fr" },

angular-app-engine-manifest.mjs has basePath defined from build line above
export default { basePath: '/prefix/',
in this configuration only first language is loaded but not the second one. To get second language working correctly we need to edit basePath in angular-app-engine-manifest.mjs to "/" after that everything works correctly.

Is there other way around, can we configure basePath for angular-app-engine-manifest?

We used to have a wrapper in angular18 which was loading each language build.

Minimal Reproduction

ng build --base-href /prefix/

Exception or Error


Your Environment

Angular CLI: 19.2.6
Node: 20.19.0
Package Manager: npm 
OS: linux x64

Angular: 19.2.5
... animations, common, compiler, compiler-cli, core, forms
... localize, platform-browser, platform-browser-dynamic
... platform-server, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1902.6
@angular-devkit/build-angular   19.2.6
@angular-devkit/core            19.2.6
@angular-devkit/schematics      19.2.6
@angular/cli                    19.2.6
@angular/ssr                    19.2.6
@schematics/angular             19.2.6
rxjs                            7.8.2
typescript                      5.5.4
zone.js                         0.15.0

Anything else relevant?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions