Recently after updating my angular cli from 16 to 17 I have been facing performance issues and I had no idea what is SSR and prerendering so I left them enabled. But the root cause was ssr.
After installing materialize-css I was getting an error M is not defined. Then I imported it from materialize-css.
Again I was getting an error window is not defined
I disabled SSR in my angular.json
"server": "src/main.server.ts",
"prerender": true,
"ssr": {
"entry": "server.ts"
}
to
"server": "src/main.server.ts",
"prerender": false,
"ssr": false