diff --git a/packages/next/build/utils.ts b/packages/next/build/utils.ts index 96a7c1d96feda..44b641e1f49ca 100644 --- a/packages/next/build/utils.ts +++ b/packages/next/build/utils.ts @@ -885,7 +885,7 @@ export async function getNamedExports( distDir: string, isLikeServerless: boolean, runtimeEnvConfig: any -): Array { +): Promise> { require('../next-server/lib/runtime-config').setConfig(runtimeEnvConfig) const components = await loadComponents(distDir, page, isLikeServerless) let mod = components.ComponentMod