From e78c42c91b1d6cf985a58317b53c98c05d383f9f Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Fri, 6 May 2022 18:11:11 +0200 Subject: [PATCH] Fix leftover todo in loader (#36734) --- packages/next/build/entries.ts | 5 ----- packages/next/build/index.ts | 3 ++- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/next/build/entries.ts b/packages/next/build/entries.ts index faf8f7224a6e..3adfc98268df 100644 --- a/packages/next/build/entries.ts +++ b/packages/next/build/entries.ts @@ -366,11 +366,6 @@ export async function createEntrypoints(params: CreateEntrypointsParams) { const getEntryHandler = (mappings: Record, isViews: boolean) => async (page: string) => { - // TODO: @timneutkens do not pass layouts to entry here - if (isViews && page.endsWith('/layout')) { - return - } - const bundleFile = normalizePagePath(page) const clientBundlePath = posix.join('pages', bundleFile) const serverBundlePath = posix.join( diff --git a/packages/next/build/index.ts b/packages/next/build/index.ts index 119a686c0be4..5884545a12ed 100644 --- a/packages/next/build/index.ts +++ b/packages/next/build/index.ts @@ -318,10 +318,11 @@ export default async function build( .traceAsyncFn(() => recursiveReadDir( viewsDir, - new RegExp(`\\.(?:${config.pageExtensions.join('|')})$`) + new RegExp(`page\\.(?:${config.pageExtensions.join('|')})$`) ) ) } + // needed for static exporting since we want to replace with HTML // files