From ea21d5b758480f1953d60084246add0eca8fde21 Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Tue, 30 May 2023 11:30:20 +0200 Subject: [PATCH] Disable entry skip --- .../next/src/build/webpack/loaders/next-app-loader.ts | 7 +------ .../build/webpack/plugins/flight-client-entry-plugin.ts | 8 +++++--- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/packages/next/src/build/webpack/loaders/next-app-loader.ts b/packages/next/src/build/webpack/loaders/next-app-loader.ts index f61ba06956146..0581c837ec5e0 100644 --- a/packages/next/src/build/webpack/loaders/next-app-loader.ts +++ b/packages/next/src/build/webpack/loaders/next-app-loader.ts @@ -380,12 +380,7 @@ async function createTreeCodeFromPath( const defaultPath = (await resolver( `${appDirPrefix}${segmentPath}/${actualSegment}/default` - )) ?? - (await resolver( - `next/dist/client/components/parallel-route-default`, - false, - true - )) + )) ?? 'next/dist/client/components/parallel-route-default' props[normalizeParallelKey(adjacentParallelSegment)] = `[ '__DEFAULT__', diff --git a/packages/next/src/build/webpack/plugins/flight-client-entry-plugin.ts b/packages/next/src/build/webpack/plugins/flight-client-entry-plugin.ts index 84c964155774a..d89fc71c9e9c0 100644 --- a/packages/next/src/build/webpack/plugins/flight-client-entry-plugin.ts +++ b/packages/next/src/build/webpack/plugins/flight-client-entry-plugin.ts @@ -225,9 +225,11 @@ export class ClientReferenceEntryPlugin { continue } - if (clientImports.length === 0 && actionImports.length === 0) { - continue - } + // TODO-APP: Enable these lines. This ensures no entrypoint is created for layout/page when there are no client components. + // Currently disabled because it causes test failures in CI. + // if (clientImports.length === 0 && actionImports.length === 0) { + // continue + // } const relativeRequest = isAbsoluteRequest ? path.relative(compilation.options.context, entryRequest)