Issue
I've upgraded to Angular 17 and change my builder to @angular-devkit/build-angular:application
as it is the new recommended way to build angular SSR apps.
Before that update, I would run npm run build
and it would build both the server and browser app perfectly fine (no pre-rendering).
And after starting the server with node ./dist/[app-name]/server/index.js
, it would render each view perfectly fine as I hit the different URLs of the app.
Now, it tried to pre-render the browser app, but without running the angular server which contains API routes that sort of proxy's to my actual API (different project), thus failing.
Questions:
- Is there a way to prevent the pre-rendering phase?
- Or, is there a way that the server runs before the pre-render phase?
- Is there something I am doing wrong?
Solution
"server": "src/main.server.ts",
"prerender": false,
"ssr": false
This is how you can disable ssr and prerendering in you angular.json
Answered By - Abrar
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.