Skip to content

Commit

Permalink
revert the error
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Oct 4, 2022
1 parent cff02a3 commit 574cf3c
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions packages/next/build/webpack-config.ts
Expand Up @@ -563,6 +563,10 @@ export default async function getBaseWebpackConfig(
rewrites.afterFiles.length > 0 ||
rewrites.fallback.length > 0

const hasAppDir = !!config.experimental.appDir
const hasConcurrentFeatures = hasReactRoot
const hasServerComponents = hasAppDir

// Only error in first one compiler (client) once
if (isClient) {
if (!hasReactRoot) {
Expand All @@ -572,11 +576,13 @@ export default async function getBaseWebpackConfig(
)
}
}
if (hasAppDir) {
throw new Error(
'`experimental.appDir` requires React 18 to be installed.'
)
}
}

const hasAppDir = !!config.experimental.appDir
const hasConcurrentFeatures = hasReactRoot
const hasServerComponents = hasAppDir
const disableOptimizedLoading = hasConcurrentFeatures
? true
: config.experimental.disableOptimizedLoading
Expand Down

0 comments on commit 574cf3c

Please sign in to comment.