fix(qwik-city): support Deno as package manager for production builds#8385
fix(qwik-city): support Deno as package manager for production builds#8385wmertens merged 2 commits intoQwikDev:mainfrom
Conversation
When using Deno to manage dependencies and run builds (e.g. `deno task build.client` + `deno task build.server`), two issues prevented a working production build: 1. The Vite plugin's temp file mechanism for passing the client manifest to the server build was gated on node/bun only, so Deno builds got null manifests and Code(31) errors. 2. SSG static generation stubbed out with Deno.exit(1) instead of delegating to the Node implementation, which works under Deno's Node compatibility layer. - Extract `hasNodeCompat()` predicate to include deno in all 4 env gates in the Vite plugin - Route Deno to the Node SSG module at runtime (same as Bun) - Remove dead static/deno stub and its build step Closes QwikDev#8364 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 0314b61 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
built with Refined Cloudflare Pages Action⚡ Cloudflare Pages Deployment
|
|
@ianlet do you know what this promptless app is by any chance? |
|
@shairez nope, no idea. I wrote to you about it in private. |
|
@wmertens will do 🫡 |
There was a problem hiding this comment.
Pull request overview
This PR fixes Qwik City production builds when dependencies/builds are run under Deno by treating Deno as Node-compatible for the Vite manifest handoff and by routing Deno SSG to the existing Node implementation.
Changes:
- Update the Qwik Vite plugin to consider
denoa Node-compatible environment for temp-manifest read/write logic. - Make
@builder.io/qwik-city/staticresolve Deno to the Node SSG entry module (same behavior as Bun). - Remove the unused Deno SSG stub and its build step, and add Deno-focused unit coverage for the Vite plugin config behavior.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/qwik-city.ts | Removes the build step for the deleted Deno SSG stub bundle. |
| packages/qwik/src/optimizer/src/plugins/vite.unit.ts | Adds Deno-specific unit tests and enables mocking sys.env as deno. |
| packages/qwik/src/optimizer/src/plugins/vite.ts | Centralizes Node-compat detection and includes deno in manifest-passing and vendor-scan env gates. |
| packages/qwik-city/src/static/index.ts | Routes Deno SSG to the Node entry module instead of a Deno-specific bundle. |
| packages/qwik-city/src/static/deno/index.ts | Deletes the previous stub implementation that exited with failure. |
| .changeset/deno-production-builds.md | Adds a changeset documenting the Deno production build fix. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Summary
Fixes #8364. When using Deno to manage dependencies and run builds (
deno task build.client+deno task build.server), two issues prevented a working production build:node/bunonly, so Deno builds got null manifests andCode(31)errors.Deno.exit(1)instead of delegating to the Node implementation, which works under Deno's Node compatibility layer.Changes
hasNodeCompat()predicate to includedenoin all 4 env gates in the Vite plugin (vite.ts)static/index.ts)static/deno/stub and its build step (scripts/qwik-city.ts)Test plan
pnpm test.unit) — 771 tests, including 2 new Deno-specific testspnpm build --qwik --qwikcity --devsucceeds