On or off
#| SPA mode on, the default | SPA mode off | |
|---|---|---|
| Use it for | React Router, Vue Router and other single-page apps | Sites made of separate HTML files, like about.html |
| Preview | Always runs index.html |
Runs the file the address names. For /about, the first of about, about.html and about/index.html |
| Published site | A page address with no file of its own gets index.html. Files like images are served as they are |
Each address needs its own file |
Links to other pages, with SPA mode off
#In the preview, /about also finds about.html. A published site does not. Link to /about.html, or put the page in about/index.html and link to /about/.
On your Playcode address, an address with no file shows your 404.html if the site has one.
Change it
#- Open the project menu and choose Settings…. Settings opens on the project's General page.
- Under Behavior, turn SPA mode on or off: "Serve every route from index.html."
- Publish again, so the published site follows.
The setting belongs to the project, and everyone who opens the project sees it.
Messages
#| Message | Fix |
|---|---|
| "SPA mode is enabled but /index.html not found." | Create index.html, or turn off SPA mode |
| "Entry point not found: /about" | With SPA mode off, the preview found no file for that address. Choose one of the files the message lists |