forked from offlinecv/OfflineCV
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwrangler.jsonc
More file actions
23 lines (23 loc) · 1.15 KB
/
Copy pathwrangler.jsonc
File metadata and controls
23 lines (23 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Cloudflare Workers static-assets config — required in-repo for Workers git
// builds (build: `npm run build`, deploy: `npx wrangler deploy`). Assets-only:
// no worker script, no build-time Cloudflare dependency — the OSS build stays
// host-agnostic (vite build → dist/), matching the repo's client-side-only
// constraint.
//
// `404-page`, not `single-page-application`. This is a multi-page app with no
// client-side router (see `appType: "mpa"` in vite.config.ts, which already
// makes dev and preview 404 honestly); the SPA setting was the odd one out and
// it answered EVERY unknown path with 200 + the root parser page. That produced
// an unbounded set of distinct URLs all serving identical content — soft 404s —
// and it swallowed /robots.txt and /sitemap.xml, which have to resolve to real
// files. `404-page` serves dist/404.html with a real 404 status instead.
// GitHub Pages picks up the same /404.html natively, so both targets agree.
{
"$schema": "node_modules/wrangler/config-schema.json",
"name": "offlinecv",
"compatibility_date": "2026-07-20",
"assets": {
"directory": "./dist",
"not_found_handling": "404-page"
}
}