Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[legacy-framework] Fix suspense/hydration bug (on canary) #2785

Merged
merged 5 commits into from Oct 2, 2021
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions nextjs/packages/next/build/webpack-config.ts
Expand Up @@ -258,6 +258,10 @@ export default async function getBaseWebpackConfig(
semver.coerce(reactDomVersion)?.version === '18.0.0')) ||
hasReactExperimental // blitz
const hasReactRoot: boolean = config.experimental.reactRoot ?? hasReact18
// Have to set this suspense env for the actual build, because the webpack
// string replace below only affects the build output, not anything during
// the build like static page optimization
process.env.__BLITZ_SUSPENSE_ENABLED = hasReactRoot

const babelConfigFile = await [
'.babelrc',
Expand Down