Unverified Commit 8ef58bb1 authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Ensure webpack build worker defaults on (#62214)

As discussed almost all webpack plugins shouldn't have issues with this
being enabled by default so removing the default condition where we
disable this optimization due to custom webpack config is more
beneficial and in the rare case a custom plugin has issues it can still
be manually disabled.

Closes NEXT-2523
parent 0b5f7d9b
...@@ -1525,12 +1525,8 @@ export default async function build( ...@@ -1525,12 +1525,8 @@ export default async function build(
let buildTraceContext: undefined | BuildTraceContext let buildTraceContext: undefined | BuildTraceContext
let buildTracesPromise: Promise<any> | undefined = undefined let buildTracesPromise: Promise<any> | undefined = undefined
// If there's has a custom webpack config and disable the build worker. // webpack build worker is always enabled unless manually disabled
// Otherwise respect the option if it's set. const useBuildWorker = config.experimental.webpackBuildWorker !== false
const useBuildWorker =
config.experimental.webpackBuildWorker ||
(config.experimental.webpackBuildWorker === undefined &&
!config.webpack)
const runServerAndEdgeInParallel = const runServerAndEdgeInParallel =
config.experimental.parallelServerCompiles config.experimental.parallelServerCompiles
const collectServerBuildTracesInParallel = const collectServerBuildTracesInParallel =
......
...@@ -170,7 +170,11 @@ if (isNextProd) { ...@@ -170,7 +170,11 @@ if (isNextProd) {
it('should pass correct nextRuntime values', async () => { it('should pass correct nextRuntime values', async () => {
const content = await next.readFile('runtimes.txt') const content = await next.readFile('runtimes.txt')
expect(content.split('\n').sort()).toEqual(['client', 'edge', 'nodejs']) expect([...new Set(content.split('\n'))].sort()).toEqual([
'client',
'edge',
'nodejs',
])
}) })
it('should generate html response by streaming correctly', async () => { it('should generate html response by streaming correctly', async () => {
......
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