Remove the warning for build worker when custom webpack present (#60820)
Drop the warning of build worker due to the common usage of custom webpack Closes NEXT-2148
This commit is contained in:
parent
65fce8aa6b
commit
7472cefb42
2 changed files with 0 additions and 23 deletions
|
@ -1,15 +0,0 @@
|
|||
---
|
||||
title: Webpack Build Worker automatic opt-out
|
||||
---
|
||||
|
||||
## Webpack Build Worker Opt-out
|
||||
|
||||
#### Why This Error Occurred
|
||||
|
||||
The Next.js config contains custom webpack configuration, as a result, the webpack build worker optimization was disabled.
|
||||
|
||||
The webpack build worker optimization helps alleviate memory stress during builds and reduce out-of-memory errors although some custom configurations may not be compatible.
|
||||
|
||||
#### Possible Ways to Fix It
|
||||
|
||||
You can force enable the option by setting `config.experimental.webpackBuildWorker: true` in the config.
|
|
@ -1365,14 +1365,6 @@ export default async function build(
|
|||
)
|
||||
nextBuildSpan.setAttribute('use-build-worker', String(useBuildWorker))
|
||||
|
||||
if (
|
||||
config.webpack &&
|
||||
config.experimental.webpackBuildWorker === undefined
|
||||
) {
|
||||
Log.warn(
|
||||
'Custom webpack configuration is detected. When using a custom webpack configuration, the Webpack build worker is disabled by default. To force enable it, set the "experimental.webpackBuildWorker" option to "true". Read more: https://nextjs.org/docs/messages/webpack-build-worker-opt-out'
|
||||
)
|
||||
}
|
||||
if (
|
||||
!useBuildWorker &&
|
||||
(runServerAndEdgeInParallel || collectServerBuildTracesInParallel)
|
||||
|
|
Loading…
Reference in a new issue