Skip to content

Commit fd8db44

Browse files
SyMindwbinnssmith
authored andcommitted
fix: Rspack throw error when using ForceCompleteRuntimePlugin (vercel#85221)
TODO: Rspack currently does not support the hooks and chunk methods required by `ForceCompleteRuntimePlugin`. Temporarily disable `ForceCompleteRuntimePlugin` when using Rspack as the bundler. This plugin ensures complete webpack runtime is available during soft navigation to prevent runtime function errors, but Rspack currently does not support the required compilation hooks and chunk graph APIs. Co-authored-by: Will Binns-Smith <[email protected]>
1 parent 850fcb2 commit fd8db44

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/next/src/build/webpack-config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1965,7 +1965,9 @@ export default async function getBaseWebpackConfig(
19651965
plugins: [
19661966
// In prod Webpack will already have a runtime for all reachable chunks.
19671967
// During dev, it will update the runtime as chunks come in which may be too late for Flight.
1968-
dev && new ForceCompleteRuntimePlugin(),
1968+
//
1969+
// TODO: Rspack currently does not support the hooks and chunk methods required by ForceCompleteRuntimePlugin.
1970+
dev && !isRspack && new ForceCompleteRuntimePlugin(),
19691971
isNodeServer &&
19701972
new bundler.NormalModuleReplacementPlugin(
19711973
/\.\/(.+)\.shared-runtime$/,

0 commit comments

Comments
 (0)