Repository navigation
fix: drop workerd-prelude and move to Astro 7.4.13 - #14
Merged
Merged
Conversation
The prelude's top-level `await import("zod/v4")` works around an esbuild
ordering bug, but this entry is bundled by Astro's Vite build. With Astro
7.4.13 the zod facade chunk imports the entry chunk back, so the await
never settles and the Worker fails at startup. The Vite build does not
need the workaround (cloudhal-dev/cloudhal#392).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Madraka <8898640+Madraka@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
src/playground/worker.tsdropsimport "@cloudhal/cloudflare/workerd-prelude". A comment explains why.astromoves from 7.4.7 to 7.4.13 (lockfile updated). Vite stays at the single 8.3.8 override.Why
try#13 held Astro at 7.4.7 because the Worker built with 7.4.13 fails at startup with "Top-level await in module is unsettled":
await import("zod/v4")sits in the entry chunk;The prelude works around an esbuild ordering bug in wrangler-bundled entries. This entry is bundled by Astro's Vite build, so it does not need it. Details: cloudhal-dev/cloudhal#392.
Checked locally (
wrangler devon thepnpm buildoutput)pnpm checkpasses: lint, typecheck, 2 tests.POST /_playground/session/sites/sites(Studio)/api/sites/s/<session>//s/<session>/rss.xml/api/auth/*/mcpNo
ZodLazyor other startup error in the log.🤖 Generated with Claude Code