Unverified Commit 94e51818 authored by Cong-Cong Pan's avatar Cong-Cong Pan Committed by GitHub

fix: Rspack throw error when using ForceCompleteRuntimePlugin (#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: 's avatarWill Binns-Smith <wbinnssmith@gmail.com>
parent 1b2d42d6
...@@ -1965,7 +1965,9 @@ export default async function getBaseWebpackConfig( ...@@ -1965,7 +1965,9 @@ export default async function getBaseWebpackConfig(
plugins: [ plugins: [
// In prod Webpack will already have a runtime for all reachable chunks. // In prod Webpack will already have a runtime for all reachable chunks.
// During dev, it will update the runtime as chunks come in which may be too late for Flight. // During dev, it will update the runtime as chunks come in which may be too late for Flight.
dev && new ForceCompleteRuntimePlugin(), //
// TODO: Rspack currently does not support the hooks and chunk methods required by ForceCompleteRuntimePlugin.
dev && !isRspack && new ForceCompleteRuntimePlugin(),
isNodeServer && isNodeServer &&
new bundler.NormalModuleReplacementPlugin( new bundler.NormalModuleReplacementPlugin(
/\.\/(.+)\.shared-runtime$/, /\.\/(.+)\.shared-runtime$/,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment