Skip to content

Commit 72ed33c

Browse files
authored
fix: add support for Next.js v12.1.6 (#21516)
1 parent f5dd2c8 commit 72ed33c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

npm/react/plugins/next/findNextWebpackConfig.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,14 @@ async function getNextWebpackConfig (config) {
2929
buildId: `@cypress/react-${Math.random().toString()}`,
3030
config: nextConfig,
3131
dev: true,
32-
isServer: false,
3332
pagesDir: findPagesDir(config.projectRoot),
3433
entrypoints: {},
3534
rewrites: { fallback: [], afterFiles: [], beforeFiles: [] },
3635
...runWebpackSpan,
36+
// Client webpack config for Next.js <= 12.1.5
37+
isServer: false,
38+
// Client webpack config for Next.js > 12.1.5
39+
compilerType: 'client',
3740
},
3841
)
3942

0 commit comments

Comments
 (0)