Repository navigation
fix(dev): run the dev app under Turbopack again - #55
Merged
Merged
Conversation
Turbopack only resolves a TypeScript file's `./x.js` specifiers to `.ts` when the app's tsconfig uses node16/nodenext module resolution; dev/tsconfig.json used "bundler", so the plugin source could not be resolved and the dev script fell back to --webpack. dev/tsconfig.json now uses NodeNext, the dev files import with explicit extensions, and the dev script uses Next's default bundler. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0122PV8TJ7ELGdAX7H2hdrRU
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
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.
pnpm devran Next with--webpackbecause Turbopack could not resolve the plugin source's./x.jsimport specifiers to their.tsfiles (admin and API answered 500).Cause
Turbopack does apply TypeScript's extension rewriting, but only when the app's tsconfig uses
node16/nodenextmodule resolution.dev/tsconfig.jsonsetmoduleResolution: bundler.Change (dev app only; nothing under
src/)dev/tsconfig.json:moduleandmoduleResolutionareNodeNext../seed.js,./helpers/credentials.js,next/link.js).next/linkis CommonJS, so the home page picks the component off the default import the way Payload's own packages do.package.json: thedevscript drops--webpack. The webpackextensionAliasindev/next.config.mjsstays for anyone runningnext dev dev --webpack.Checked locally
next dev dev(Turbopack):/admin,/admin/login,/admin/collections/notifications,/,/demoand/api/users/meanswer 200, no resolve errors in the log.next dev dev --webpack:/adminand/answer 200.pnpm lint(0 errors),tsc --noEmit,tsc --noEmit -p dev/tsconfig.json,pnpm test:int(133 passed).Not checked:
next build devand the Playwright suite.🤖 Generated with Claude Code
https://claude.ai/code/session_0122PV8TJ7ELGdAX7H2hdrRU