Rogerto
Rogerto

Reputation: 317

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.

Upvotes: 4

Views: 2977

Answers (2)

I used pages_build_output_dir"./dist/angular/browser" since angular was the default name for my project.

Upvotes: 0

shivench
shivench

Reputation: 54

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.

Upvotes: 1

Related Questions