Skip to content

fix(showcase): run dashboard dev on webpack so it resolves the shared cell-model fold - #5959

Merged
jpr5 merged 1 commit into
mainfrom
fix/dashboard-dev-webpack
Jul 14, 2026
Merged

jpr5 merged 1 commit into
mainfrom
fix/dashboard-dev-webpack

Conversation

@jpr5

@jpr5 jpr5 commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Problem

pnpm dev on the shell-dashboard fails to start the fold-importing routes:

Module not found: Can't resolve './live-status.js'
Module not found: Can't resolve './format-ts.js'
Module not found: Can't resolve './staleness.js'
GET / 500

The dashboard re-exports the shared cell-model fold from the harness (showcase/harness/src/shared/cell-model/*.ts). Those fold files are authored for the harness's pure-Node-ESM runtime, so their internal relative imports carry explicit .js extensions (e.g. import { formatTs } from "./format-ts.js") even though they exist on disk as .ts. export * does not rewrite those internal edges.

next build (webpack) already resolves this via the resolve.extensionAlias in next.config.ts (added in #5955), which tells webpack to try the TS sources for a .js specifier. But the dev script forced Turbopack (next dev --turbopack), and Turbopack has no resolve.extensionAlias parity (Next #82945) — so dev couldn't resolve the fold.

Fix

Drop --turbopack from the dev script. On Next 15.5.x, --turbopack is an explicit opt-in flag (there is no --webpack opt-out); plain next dev runs webpack, which honours the existing extensionAlias.

- "dev": "next dev --turbopack --port 3002",
+ "dev": "next dev --port 3002",

build is unchanged (next build = webpack). A note in next.config.ts explains why dev uses webpack.

Tradeoff: dev loses Turbopack's faster HMR and falls back to webpack-speed dev until Turbopack ships extensionAlias parity (#82945), at which point dev can switch back.

Red / Green (empirical, this branch)

Empirical proof of which bundler each command runs (Next 15.5.15 startup banner):

  • next dev --turbopack → ▲ Next.js 15.5.15 (Turbopack)
  • next dev → ▲ Next.js 15.5.15 (no "(Turbopack)" = webpack)

RED — next dev --turbopack, GET /:

▲ Next.js 15.5.15 (Turbopack)
Module not found: Can't resolve './format-ts.js'
Module not found: Can't resolve './live-status.js'
Module not found: Can't resolve './staleness.js'
GET / 500 in 3691ms

GREEN — next dev (webpack), GET /:

▲ Next.js 15.5.15
✓ Ready in 1124ms
✓ Compiled / in 1948ms (704 modules)
GET / 200 in 2844ms

No Can't resolve.

No regression — next build (webpack) still resolves the fold:

Creating an optimized production build ...
✓ Compiled successfully in 3.1s

(The fold compiles clean under webpack via the unchanged extensionAlias.)

Deploy path is UNAFFECTED

The dev script is never in the build or runtime path. showcase/shell-dashboard/Dockerfile builds with npx next build (webpack) and serves with npx next start. This change touches only local pnpm dev — the built/deployed dashboard image is byte-for-byte identical.

… cell-model fold

Turbopack has no resolve.extensionAlias parity (Next #82945), so
'next dev --turbopack' can't resolve the shared cell-model fold's
.js->.ts specifiers and fails with Can't resolve './live-status.js'.
The extensionAlias in next.config.ts (added in #5955) is honoured by
webpack, which next build already uses. Drop --turbopack from the dev
script so dev runs on webpack too and resolves the fold.

Deploy path unaffected: the Dockerfile builds with 'next build' (webpack)
and serves with 'next start' -- the dev script is never in the build or
runtime path.
@github-actions

Copy link
Copy Markdown
Contributor

📣 Social Copy Generator

Generate social media copies (Twitter/X, LinkedIn, Blog Post) for this PR using Claude.

  • Generate social media copies

@github-actions

Copy link
Copy Markdown
Contributor

Production Digest-Pinning Audit

All 41 services digest-pinned.

Run 2026-07-13 23:25:12 PDT — 0 finding(s).

@jpr5
jpr5 merged commit 4a0bb8d into main Jul 14, 2026
20 checks passed
@jpr5
jpr5 deleted the fix/dashboard-dev-webpack branch July 14, 2026 06:32
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.

1 participant