diff --git a/packages/next/src/build/webpack/loaders/metadata/discover.ts b/packages/next/src/build/webpack/loaders/metadata/discover.ts index 74d0403ed6d2d..26653cfea1092 100644 --- a/packages/next/src/build/webpack/loaders/metadata/discover.ts +++ b/packages/next/src/build/webpack/loaders/metadata/discover.ts @@ -114,7 +114,7 @@ export async function createStaticMetadataFromRoute( // WEBPACK_RESOURCE_QUERIES.metadata query here only for filtering out applying to image loader )}!${filepath}?${WEBPACK_RESOURCE_QUERIES.metadata}` - const imageModule = `(async (props) => (await import(/* webpackMode: "eager" */ ${JSON.stringify( + const imageModule = `(async (props) => await (await import(/* webpackMode: "eager" */ ${JSON.stringify( imageModuleImportSource )})).default(props))` hasStaticMetadataFiles = true