Skip to content

Fix Cloudflare worker import paths on Windows#6757

Merged
vimtor merged 1 commit intoanomalyco:devfrom
DivinPrince:dev
Apr 17, 2026
Merged

Fix Cloudflare worker import paths on Windows#6757
vimtor merged 1 commit intoanomalyco:devfrom
DivinPrince:dev

Conversation

@DivinPrince
Copy link
Copy Markdown
Contributor

Summary

Cloudflare Worker builds on Windows broke because the absolute handler path was embedded in generated stdin JS using double-quoted string literals. Backslashes were interpreted as escapes, corrupting the path. Use filepath.ToSlash on that path before interpolating it into the import/export source in pkg/runtime/worker/worker.go.

Related

Fixes #6756

Test plan

  • go test ./pkg/runtime/worker/...
  • On Windows: sst dev or deploy with home: "cloudflare" and a nested handler path; confirm bundling succeeds.

@vimtor vimtor merged commit 005ad4a into anomalyco:dev Apr 17, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows: Cloudflare Worker build fails — Runtime.Build / esbuild resolves mangled absolute paths (backslashes)

2 participants