diff --git a/packages/next/build/entries.ts b/packages/next/build/entries.ts index faf8f7224a6e4..3adfc98268dfa 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 119a686c0be41..5884545a12ed5 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