Skip to content

Cannot pre-render wildcard routes when using outputMode: 'server' #30035

@griest024

Description

@griest024

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

I have a few wildcard routes in my app. There are a large number of routes which will match these wildcard routes and they are all listed in a route file as described in the docs.

"outputMode": "server",
"prerender": {
	"routesFile": "renderableRoutes.txt",
	"discoverRoutes": true
},

However when I build, I get the warning The "prerender" option is not considered when "outputMode" is specified. and the routes specified in renderableRoutes.txt are not prerendered. Removing outputMode causes the routes to be prerendered, but I get the error Error: Angular app engine manifest is not set. Please ensure you are using the '@angular/build:application' builder to build your server application. when running the server.

Minimal Reproduction

  • Add routesFile to angular.json
  • Remove outputMode from angular.json
  • Build
  • Serve SSR

Exception or Error

Error: Angular app engine manifest is not set. Please ensure you are using the '@angular/build:application' builder to build your server application

Your Environment

Angular CLI: 19.2.6
Node: 18.20.7
Package Manager: npm 10.8.2
OS: linux x64

Angular: 19.2.5
... animations, common, compiler, compiler-cli, core, elements
... forms, language-service, platform-browser
... platform-browser-dynamic, platform-server, router
... service-worker

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/cdk                    19.2.8
@angular/cli                    19.2.6
@angular/pwa                    19.2.6
@angular/ssr                    19.2.6
@schematics/angular             19.2.6
ng-packagr                      19.0.1
rxjs                            7.8.1
typescript                      5.5.4
zone.js                         0.15.0

Anything else relevant?

I am using the @angular-devkit/build-angular:application builder.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions