Repository navigation
chore(dev): switch local dev server to Turbopack - #26
Merged
Merged
Conversation
The webpack dev server's incremental compile cache repeatedly corrupted after file churn outside the normal edit-save cycle (git branch switches, resets, checkouts) — surfacing as a "Cannot find module './XXXX.js'" 500 that only cleared after killing the server, deleting .next, and restarting. Turbopack's content-addressed, function-level caching doesn't share that failure mode. Verified: `pnpm dev` compiles and serves the app correctly (including DB-backed pages), hot reload still works, and it survives a create-branch / switch / delete / stash-pop cycle — the exact kind of git churn that broke the old dev server every time. Production `build` is untouched; Turbopack is dev-only here. Also adds `pnpm dev:clean` (rm -rf .next && next dev --turbopack) as a one-command fallback for the rare case a restart is still needed.
CodeWithEugene
force-pushed
the
chore/turbopack-dev
branch
from
September 24, 2026 20:22
c309152 to
6c39185
Compare
This branch was successfully deployed
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.
Summary
Root-caused the "localhost keeps breaking, have to cancel and restart" issue: the webpack dev server's incremental compile cache repeatedly corrupted after file churn outside the normal edit-save cycle (git branch switches, resets, checkouts) — surfacing as a
Cannot find module './XXXX.js'500 that only cleared after killing the server, deleting.next, and restarting. This happened repeatedly during this session's work.pnpm devnow runsnext dev --turbopack. Turbopack's content-addressed, function-level incremental caching doesn't share webpack dev's failure mode here.pnpm dev:cleanadded as a one-command fallback (rm -rf .next && next dev --turbopack) for the rare case a hard reset is still needed.build/startare untouched — Turbopack is dev-only, production build stays on the more battle-tested webpack path.Test plan
pnpm run typecheck/pnpm run lint— cleanpnpm exec vitest run tests/unit— 98/98 passingpnpm run build— production build succeeds (unaffected by this change)pnpm devstarts under Turbopack, compiles, and serves pages including DB-backed ones (/events,/developers)git stash pop— while the dev server stayed running, then hit a page not yet compiled in that session. No corruption, no restart needed.