Skip to content

Commit 68eed5c

Browse files
committed
test: skip webpack configuration on turbopack build error
1 parent 4aaeb79 commit 68eed5c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/fixtures/middleware/next.config.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@ const nextConfig = {
1919

2020
return config
2121
},
22+
// turbopack becomes default for builds in Next 16. There is failure when webpack configuration is present
23+
// without turbopack configuration, so we add a turbopack configuration here to ensure this fixture
24+
// works with default build bundler for all tested versions
25+
// see https://github.com/vercel/next.js/blob/ba5a0ca79944b4c8a59d80d677bfedaf0fef33d6/packages/next/src/lib/turbopack-warning.ts#L159-L177
26+
turbopack: {
27+
// there need to be some keys here, as empty object despite currently being suggesting is not actually allowing build to go through
28+
// so we'll set root (which serves same purpose as outputFileTracingRoot more generally)
29+
root: __dirname,
30+
},
2231
outputFileTracingRoot: __dirname,
2332
}
2433

0 commit comments

Comments
 (0)