Prerendering routes not working when switching from @angular-devkit/build-angular:application
to @nx/angular:application
#29276
Labels
@angular-devkit/build-angular:application
to @nx/angular:application
#29276
Current Behavior
Versions:
Nx:
20.2.1
Angular:
19.0.4
When I create a new project with:
And setup prerendering like this:
apps/frontend/project.json
apps/frontend/routes.txt
It works fine:
But as soon as I switch to the
@nx/angular:appliation
executor, it always only prerenders 0 routes suddenly:apps/frontend/project.json
Expected Behavior
It should prerender the same amount of routes as in the case with the
@angular-devkit/build-angular:application
executorGitHub Repo
https://github.com/webtsofficial/nx-ssr-prerender-bug
Steps to Reproduce
npx create-nx-workspace@latest test
NX Let's create a new workspace [https://nx.dev/getting-started/intro]
✔ Which stack do you want to use? · angular
✔ Integrated monorepo, or standalone project? · integrated
✔ Application name · frontend
✔ Which bundler would you like to use? · esbuild
✔ Default stylesheet format · scss
✔ Do you want to enable Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering)? · Yes
✔ Would you like to use the Server Routing and App Engine APIs (Developer Preview) for this server application? · No
✔ Test runner to use for end to end (E2E) tests · playwright
✔ Which CI provider would you like to use? · skip
✔ Would you like remote caching to make your build faster? · skip
switch from
@angular-devkit/build-angular:application
to@nx/angular:application
Configure prerendering with a
routes.txt
file:"prerender": {
"discoverRoutes": false,
"routesFile": "apps/frontend/routes.txt"
},
run the build command and se, that 0 routes were prerendered
Nx Report
Failure Logs
Package Manager Version
npm 10.8.2
Operating System
Additional Information
No response
The text was updated successfully, but these errors were encountered: