angularsingle-page-applicationcloudflarecloudflare-workers

How to get Angular app working with Cloudflare Workers - Workers Sites


I am struggling to get an SPA working using Angular with Cloudflare's Workers Sites. I am following the tutorial found here (but supplementing steps for Angular- not React), and everything is fine until however once published I am getting the browser error - could not find index.html in your content namespace

My troubleshooting thus far has let me to link below:

https://github.com/cloudflare/kv-asset-handler#servesinglepageapp

however I am unsure how to configure/use this guidance for Angular so that it solves my above problem.


Solution

  • The wrangler.toml file should have the build folder on [site].bucket pointing to ./dist/<name-of-the-project> instead of ./build as seen in the guide.