diff --git a/packages/next/build/entries.ts b/packages/next/build/entries.ts index 8f179ff8576ed..aa9b46b4f2d4b 100644 --- a/packages/next/build/entries.ts +++ b/packages/next/build/entries.ts @@ -303,7 +303,7 @@ export async function createEntrypoints(params: CreateEntrypointsParams) { (mappings: Record, pagesType: 'app' | 'pages' | 'root') => async (page: string) => { const bundleFile = normalizePagePath(page) - const clientBundlePath = posix.join('pages', bundleFile) + const clientBundlePath = posix.join(pagesType, bundleFile) const serverBundlePath = pagesType === 'pages' ? posix.join('pages', bundleFile)