We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 97056e0 commit d86ddfbCopy full SHA for d86ddfb
packages/next/src/server/next.ts
@@ -534,13 +534,20 @@ function createServer(
534
options: NextServerOptions & {
535
turbo?: boolean
536
turbopack?: boolean
537
+ webpack?: boolean
538
}
539
): NextWrapperServer {
540
if (
541
options &&
542
(options.turbo || options.turbopack || process.env.IS_TURBOPACK_TEST)
543
) {
544
+ if (options.webpack) {
545
+ throw new Error('Pass either webpack or turbopack, not both.')
546
+ }
547
process.env.TURBOPACK = '1'
548
+ } else if (!options.webpack) {
549
+ // If no options are set we default to turbopack
550
+ process.env.TURBOPACK = 'auto'
551
552
// The package is used as a TypeScript plugin.
553
0 commit comments