fix(@typegpu/cli): Production builds - #2908
Conversation
|
pkg.pr.new packages benchmark commit |
Resolution Time Benchmark---
config:
themeVariables:
xyChart:
plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
title "Random Branching (🔴 PR | 🔵 main | 🟢 release)"
x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
y-axis "time (ms)"
line [0.88, 1.65, 3.73, 5.47, 6.54, 9.71, 21.02, 20.62]
line [0.77, 1.59, 3.60, 5.81, 6.71, 11.19, 20.21, 22.75]
line [0.84, 1.68, 3.93, 5.49, 6.28, 11.91, 20.47, 22.99]
---
config:
themeVariables:
xyChart:
plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
title "Linear Recursion (🔴 PR | 🔵 main | 🟢 release)"
x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
y-axis "time (ms)"
line [0.29, 0.48, 0.67, 0.78, 1.01, 1.09, 1.26, 1.37]
line [0.31, 0.49, 0.68, 0.80, 1.00, 1.06, 1.23, 1.30]
line [0.31, 0.53, 0.64, 0.77, 0.96, 1.08, 1.27, 1.38]
---
config:
themeVariables:
xyChart:
plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
title "Full Tree (🔴 PR | 🔵 main | 🟢 release)"
x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
y-axis "time (ms)"
line [0.77, 2.04, 2.99, 6.15, 10.82, 22.80, 49.38, 97.65]
line [0.79, 2.02, 3.37, 7.57, 11.54, 22.72, 48.36, 97.85]
line [0.87, 1.93, 3.29, 5.91, 10.70, 23.26, 48.15, 99.21]
|
Bundle size comparison (
|
| 🟢 Decreased | ➖ Unchanged | 🔴 Increased | ❔ Unknown |
|---|---|---|---|
| 0 | 325 | 0 | 0 |
import { ... } in PR vs import * as ... in PR (is the library tree-Shakeable?):
| Test | tsdown |
|---|---|
| tgpu_init.ts | 263.09 kB ( |
| tgpu_initFromDevice.ts | 262.55 kB ( |
| tgpu_resolve.ts | 161.75 kB ( |
| tgpu_resolveWithContext.ts | 161.68 kB ( |
| tgpu_bindGroupLayout.ts | 62.32 kB ( |
| tgpu_mutableAccessor.ts | 57.04 kB ( |
| tgpu_accessor.ts | 57.04 kB ( |
| tgpu_privateVar.ts | 55.73 kB ( |
| tgpu_workgroupVar.ts | 55.73 kB ( |
| tgpu_const.ts | 55.15 kB ( |
| tgpu_lazy.ts | 54.95 kB ( |
| tgpu_fragmentFn.ts | 39.68 kB ( |
| tgpu_fn.ts | 39.62 kB ( |
| tgpu_vertexFn.ts | 39.50 kB ( |
| tgpu_computeFn.ts | 39.20 kB ( |
| tgpu_vertexLayout.ts | 28.33 kB ( |
| tgpu_comptime.ts | 15.93 kB ( |
| tgpu_unroll.ts | 1.75 kB ( |
| tgpu_slot.ts | 1.70 kB ( |
If you wish to run a comparison for other, slower bundlers, run the 'Tree-shake test' from the GitHub Actions menu.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Waku template
_package.json—waku startnow binds the production server to--host localhostinstead of the previous0.0.0.0default. This keeps the app on a loopback address, which browsers treat as a secure (potentially-trustworthy) origin, so WebGPU remains enabled in production. - Next.js template
next.config.ts— removesoutput: 'export', which was incompatible with the template'sstart: "next start"production script (static-export mode has no server runtime).distDir: './dist'is retained.
I verified the waku start --host flag against the waku source (packages/waku/src/cli.ts defines -h, --host and forwards it to runStart), so the new script is well-formed. Both changes are minimal, correctly scoped (no other template carries these patterns), and directly address the reported production-build breakage. One note, not an action: binding to localhost means the production server is only reachable on the host — LAN/device access would need a reverse proxy — but that is consistent with WebGPU requiring a loopback origin anyway.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Reverted the waku host change — commit
ae6d9ca13drops the--host localhostproduction-script change fromtemplate-waku-bare/_package.json, restoring"start": "waku start". This was flagged in the prior review as a tradeoff (a localhost-bound server is only host-reachable), so removing it keeps the previous default host behavior. - Kept the Next.js fix —
template-nextjs-bare/next.config.tsretains theoutput: 'export'removal (incompatible withnext start), which remains correct and was already approved.
The PR now stands as a single, minimal fix scoped to the Next.js template. The description was also updated to match, no stale references remain.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

Fixes:
nextjs:output: 'export'is incompatible withnext start