You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Move the Vue app from Cloudflare Pages to a Worker with static assets #126
The Vue app deploys to Cloudflare Pages through .github/workflows/deploy-cloudflare.yml (wrangler-action, command: pages deploy ... --project-name=factoriotools). Cloudflare now says to start new projects on Workers, and it has a guide for moving Pages projects over. Pages is not deprecated, so there is no deadline. This is housekeeping, found by a cross-repo sweep on 2026-09-25.
src/vue/public/_worker.js becomes the Worker's main. It is a Pages "advanced mode" Worker, and the guide covers this case. Move it out of public/, so it is not also uploaded as an asset. Point main at it, and set "assets": { "directory": "<build>/dist", "binding": "ASSETS" }. The env.ASSETS.fetch calls keep working.
The SPA fallback. The script returns the 404.html shell with status 404 for client-side routes like /oil-field. That can stay as it is. The built-in "not_found_handling": "single-page-application" is simpler, but it serves index.html with status 200, which changes what crawlers see. Pick one on purpose.
The old-host redirect. The script 301s factoriotools-5jg.pages.dev to oilfieldplanner.factorygamefan.com. A Worker never receives requests for a pages.dev host. So either keep the Pages project alive as a redirect-only stub, or accept that the old host stops redirecting.
Workflow: change command: to deploy (plus --config if wrangler.jsonc does not sit next to the build). Pull requests already build without deploying, so that part stays.
Domain:oilfieldplanner.factorygamefan.com is a proxied CNAME to the Pages project. Add it as a Custom Domain on the Worker, which replaces that record. Touch no other factorygamefan.com records.
Previews. Pages made a preview URL for each branch. For the same on Workers, set "preview_urls": true. That is optional here, since the workflow only deploys main.
Done when
https://oilfieldplanner.factorygamefan.com/ and a hard load of /oil-field both work from the Worker.
A decision is written down for the factoriotools-5jg.pages.dev redirect.
Done in #127. oilfieldplanner.factorygamefan.com now serves from the assets-only Worker oilfieldplanner-factorygamefan-com (not_found_handling: 404-page, so client routes like /oil-field still get the app shell with status 404, as on Pages). The deploy on main is green and re-attaches the custom domain. Decision on the old host: the Pages project factoriotools is kept only as a redirect stub, and factoriotools-5jg.pages.dev/* now 301s to the same path and query on the custom domain.
Activity
Make the Worker assets-only and add a long cache for hashed assets
Move the Vue app from Cloudflare Pages to a Worker with static assets (…
wormeyman commentedon Sep 26, 2026
Done in #127.
oilfieldplanner.factorygamefan.comnow serves from the assets-only Workeroilfieldplanner-factorygamefan-com(not_found_handling: 404-page, so client routes like/oil-fieldstill get the app shell with status 404, as on Pages). The deploy on main is green and re-attaches the custom domain. Decision on the old host: the Pages projectfactoriotoolsis kept only as a redirect stub, andfactoriotools-5jg.pages.dev/*now 301s to the same path and query on the custom domain.Restore the nosniff and Referrer-Policy headers Pages used to add (#132)