Static Cloudflare deploy ignores `cloudflare.assets.html_handling`
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 77/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
Research direction
Start with packages/deploy-cloudflare/src/static.ts near line 114, then trace how assetConfig is built in packages/void/src/cli/deploy-cloudflare-static.ts and packages/void/src/cli/package.ts. Check how static deploy config chooses html_handling when the root Cloudflare setting is present or absent; done when the authored value is retained and the fallback remains auto-trailing-slash.
Written by the indexing model from the issue text.
Description
With inference.appType: "static" and void deploy --platform cloudflare, the deployed Worker always gets html_handling: "auto-trailing-slash", whatever void.config.ts sets:
export default defineConfig({
cloudflare: { assets: { html_handling: "drop-trailing-slash" } },
inference: { appType: "static", outputDir: "dist/client" },
});
Framework deploys honor this setting; static deploys drop it.
Cause:
writeCloudflareStaticDeployConfigcopies the root config, then overwritesassets.html_handlingwithoptions.assetConfig.html_handling ?? "auto-trailing-slash":packages/deploy-cloudflare/src/static.ts#L114assetConfigcomes frombuildStaticManifest(deploy-cloudflare-static.ts#L338-L363). ThroughresolveSpaFallbackChain(package.ts#L71-L90) it only ever carriesnot_found_handling. So the fallback always wins.
Effect: a prerendered site that writes about/index.html and links to /about gets a 307 to /about/ on every full page load, and there's no config to stop it.
Expected: use the authored cloudflare.assets.html_handling when set, and fall back to auto-trailing-slash only when it isn't.
Workaround: write pages as about.html instead of about/index.html. In TanStack Start that's prerender.autoSubfolderIndex: false.
void 1.2.1, @void/deploy-cloudflare 1.2.1.
- Dominant language
- TypeScript
- Stars
- 580
- Forks
- 56
- Avg merge
- 11h 32m
- Merged PRs (30d)
- 158
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from voidzero-dev/void
-
Difficulty 5/5 Over a week Newbie friendliness 42/100
voidzero-dev/void#638 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 57/100
voidzero-dev/void#636 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 67/100
voidzero-dev/void#635 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
voidzero-dev/void#627 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
voidzero-dev/void#619 ·
Maintainers usually reply within 1 day
All issues in voidzero-dev/void
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
lichess-org/lila#22324 · 1 comment ·
Maintainers usually reply within 1 day
-
[Feature Request] [Web] Expose kvCacheQuantizationBits in the onnxruntime-web WebGPU EP optionsOpenep:WebGPU platform:web quantization
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
microsoft/onnxruntime#33752 ·
Maintainers usually reply within 2 days
-
[Skill Bug]: entra-agent-id: inaccurate blueprint permission inheritance and parent token sub claimOpenbug entra-agent-id
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
microsoft/GitHub-Copilot-for-Azure#3467 · 1 comment ·
Maintainers usually reply within 1 day
-
fix(worker): keep normal prepare waiting states failure-freePossibly taken @LichKing-2234 claimed this today. Openagent:codex priority:P1
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
AgoraIO-Extensions/agent-infra#3745 ·
Maintainers usually reply within 1 day
-
The five-line work window can drop its oldest line: the per-line byte share ignores the JSON framingPossibly taken @Eapp1e claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
makecindy/cindy#7973 · 1 comment ·
Maintainers usually reply within 1 day