angularfirebase

How to deploy Angular 17 ssr mode on firebase


I have been researching this for a week now and not getting a clear answer. I have developed an angular 17 project in ssr mode, installed firebase from npm created the build, firebase init hosting and said N for set up as single page app, gave the directory for dist/my-project/server. I am not able to view the page i deployed as it says index.html is not found and then I did rewrites for index.server.html then it says the mime type is given as text/html for a polyfills.js. Anyone who can tell the way to actually deploy would be really really helpful.

Also for firebase initialization I have given all yes except for the one single page and github initialization. If at all its very hard to give here, it would really really help if anyone provides of any links where it is documented so I can follow the documents


Solution

  • This was bothering me. I am not sure if this will help someone else but it is a super annoying fix. "public": "dist/<my-project-name>/browser", the index.html file that is generated when using ng build creates a file named index.**csr**.html AND NOT just index.html which firebase expects.

    Manually rename to index.html