Skip to content

fix(@typegpu/cli): Production builds - #2908

Open
cieplypolar wants to merge 3 commits into
mainfrom
fix/templates-build
Open

fix(@typegpu/cli): Production builds#2908
cieplypolar wants to merge 3 commits into
mainfrom
fix/templates-build

Conversation

@cieplypolar

@cieplypolar cieplypolar commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Fixes:

  • nextjs: output: 'export' is incompatible with next start

Copilot AI lite review requested due to automatic review settings August 24, 2026 09:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Aug 24, 2026

Copy link
Copy Markdown

pkg.pr.new

packages
Ready to be installed by your favorite package manager ⬇️

https://pkg.pr.new/software-mansion/TypeGPU/typegpu@6635c9b0fd03d946d0eb4dc250ae6bf20b7c45e9
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/cli@6635c9b0fd03d946d0eb4dc250ae6bf20b7c45e9

benchmark
view benchmark

commit
view commit

@cieplypolar cieplypolar changed the title fix(@typegpu-cli): Production builds fix(@typegpu/cli): Production builds Aug 24, 2026
@github-actions

github-actions Bot commented Aug 24, 2026

Copy link
Copy Markdown

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]
Loading
---
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]
Loading
---
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]
Loading

@github-actions

github-actions Bot commented Aug 24, 2026

Copy link
Copy Markdown

Bundle size comparison (import * as ... in PR vs import * as ... in target):

🟢 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 ($${\color{green}-3.5\%}$$)
tgpu_initFromDevice.ts 262.55 kB ($${\color{green}-3.7\%}$$)
tgpu_resolve.ts 161.75 kB ($${\color{green}-40.7\%}$$)
tgpu_resolveWithContext.ts 161.68 kB ($${\color{green}-40.7\%}$$)
tgpu_bindGroupLayout.ts 62.32 kB ($${\color{green}-77.1\%}$$)
tgpu_mutableAccessor.ts 57.04 kB ($${\color{green}-79.1\%}$$)
tgpu_accessor.ts 57.04 kB ($${\color{green}-79.1\%}$$)
tgpu_privateVar.ts 55.73 kB ($${\color{green}-79.6\%}$$)
tgpu_workgroupVar.ts 55.73 kB ($${\color{green}-79.6\%}$$)
tgpu_const.ts 55.15 kB ($${\color{green}-79.8\%}$$)
tgpu_lazy.ts 54.95 kB ($${\color{green}-79.8\%}$$)
tgpu_fragmentFn.ts 39.68 kB ($${\color{green}-85.4\%}$$)
tgpu_fn.ts 39.62 kB ($${\color{green}-85.5\%}$$)
tgpu_vertexFn.ts 39.50 kB ($${\color{green}-85.5\%}$$)
tgpu_computeFn.ts 39.20 kB ($${\color{green}-85.6\%}$$)
tgpu_vertexLayout.ts 28.33 kB ($${\color{green}-89.6\%}$$)
tgpu_comptime.ts 15.93 kB ($${\color{green}-94.2\%}$$)
tgpu_unroll.ts 1.75 kB ($${\color{green}-99.4\%}$$)
tgpu_slot.ts 1.70 kB ($${\color{green}-99.4\%}$$)

If you wish to run a comparison for other, slower bundlers, run the 'Tree-shake test' from the GitHub Actions menu.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

  • Waku template _package.jsonwaku start now binds the production server to --host localhost instead of the previous 0.0.0.0 default. 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 — removes output: 'export', which was incompatible with the template's start: "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.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

Comment thread packages/typegpu-cli/templates/template-waku-bare/_package.json Outdated

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

  • Reverted the waku host change — commit ae6d9ca13 drops the --host localhost production-script change from template-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 fixtemplate-nextjs-bare/next.config.ts retains the output: 'export' removal (incompatible with next 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.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@cieplypolar
cieplypolar requested a review from iwoplaza August 27, 2026 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants