Skip to content

Hosting details for Cloudflare Workers doesn't work for single-page app on Cloudflare Pages #5619

@westhouseit

Description

@westhouseit

Which project does this relate to?

Start

Describe the bug

SPA (single-page app) mode isn't able to the shell properly locally or on Cloudflare Pages. This is because Pages expects the shell at /index.html and doesn't appear to accept a redirect.

Your Example Website or App

tbc

Steps to Reproduce the Bug or Issue

As per directions in docs for SPA mode

  1. Configuring SPA mode
  2. Basic Redirects Example
  3. Shell Mask Path

Expected behavior

SPA shell is transparently loaded when accessing the site root on a local or Cloudflare Pages build.

Screenshots or Videos

No response

Platform

  • Start Version: 1.133.27
  • OS: N/A, though I use Ubuntu 24.04 for dev env
  • Browser: N/A
  • Bundler: vite
  • Bundler Version: 7.1.12

Additional context

It's possible that using a dynamic routing for the root path is causing or aggravating the issue. For example:
/routes/$id.tsx

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationEverything documentation related

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions