Cloudflare serving up HTML for static assets

For Workers & Pages, what is the name of the domain?

https://my-first-supabase.pages.dev/

What is the issue or error you’re encountering

static assets are not served

What steps have you taken to resolve the issue?

For a SPA, the assets have been uploaded correctly. The page is serving the root HTML correctly. However, it is not serving the assets.

I’ve tried changing the assets folder name: i.e. “assets”/“public”. The folder is uploaded correctly, but regardless of the name of the folder, Cloudflare is serving up the root HTML file instead of the actual resource (JS/HTML file).

What are the steps to reproduce the issue?

Navigate to https://my-first-supabase.pages.dev/
Open up the network tab
Note that all asset files just return HTML

Screenshot of the error

Correction for post “actual resource (JS/HTML file)” should say "actual resource (JS/CSS file).

Figured it out. It was because my SPA was being built assuming a basename – which I no longer needed. I removed that and all works correclty.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.