feat: add turbopack support for Next.js v15#44
Merged
Ethan-Arrowood merged 2 commits intoMay 6, 2026
Conversation
Replace the `webpack: boolean` plugin option with a `bundler` option that accepts "webpack" or "turbopack". The default is version-aware: - v16: turbopack (matches Next.js v16 default) - v15: webpack (matches Next.js v15 default) - v14: webpack (no turbopack support) Users can now explicitly set `bundler: turbopack` for v15 to opt in, or `bundler: webpack` for v16 to opt out. - Add `next-15-turbopack` fixture and integration test - Update `next-16-webpack` fixture to use `bundler: webpack` Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Next.js v14 does not support turbopack via the createServer or nextBuild APIs. Log an error and fall back to webpack if a user sets `bundler: turbopack` with a v14 application. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
4 tasks
Ethan-Arrowood
added a commit
that referenced
this pull request
May 6, 2026
* feat: add turbopack support for Next.js v16 Next.js v16 defaults to Turbopack. The plugin previously hardcoded webpack for both build and serve, disabling turbopack entirely. - Add `webpack` boolean plugin option (defaults to false) so users can opt into webpack when needed, mirroring the `next build --webpack` CLI flag - Update `withHarper()` to include a `turbopack` config key, preventing Next.js v16 from erroring when it sees a webpack config without one - Add `next-16-webpack` fixture and integration test to cover both bundler paths Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * add allowImportingTsExtensions for integration testing tsconfig * feat: add turbopack support for Next.js v15 (#44) * feat: add turbopack support for Next.js v15 and refactor bundler option Replace the `webpack: boolean` plugin option with a `bundler` option that accepts "webpack" or "turbopack". The default is version-aware: - v16: turbopack (matches Next.js v16 default) - v15: webpack (matches Next.js v15 default) - v14: webpack (no turbopack support) Users can now explicitly set `bundler: turbopack` for v15 to opt in, or `bundler: webpack` for v16 to opt out. - Add `next-15-turbopack` fixture and integration test - Update `next-16-webpack` fixture to use `bundler: webpack` Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat: add v14 turbopack guard and validate all versions (#45) Next.js v14 does not support turbopack via the createServer or nextBuild APIs. Log an error and fall back to webpack if a user sets `bundler: turbopack` with a v14 application. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: document bundler option in README Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
webpack: booleanplugin option (from feat: add turbopack support for Next.js v16 #43) into abundleroption that accepts"webpack"or"turbopack"with version-aware defaults:turbopack(matches Next.js v16 default)webpack(matches Next.js v15 default)webpack(no turbopack support)bundler: turbopackfor v15 to opt into turbopack, orbundler: webpackfor v16 to stay on webpackturbopack: falsefrom v15 build and serve pathsnext-15-turbopackfixture and integration testTest plan
npm run build— TypeScript compiles cleannext-15.pw.ts— webpack (default): 3/3 passednext-15-turbopack.pw.ts— turbopack (explicitbundler: turbopack): 3/3 passednext-16.pw.ts— turbopack (default): 3/3 passednext-16-webpack.pw.ts— webpack (explicitbundler: webpack): 3/3 passed🤖 Generated with Claude Code