File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed
packages/next/src/build/webpack/loaders Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -76,8 +76,6 @@ async function getStaticAssetRouteCode(
7676 resourcePath : string ,
7777 fileBaseName : string
7878) {
79- resourcePath = path . posix . normalize ( resourcePath )
80-
8179 const cache =
8280 fileBaseName === 'favicon'
8381 ? 'public, max-age=0, must-revalidate'
@@ -107,7 +105,7 @@ const buffer = Buffer.from(${JSON.stringify(
107105if (${ isTwitter || isOpenGraph } ) {
108106 const fileSizeInMB = buffer.byteLength / 1024 / 1024
109107 if (fileSizeInMB > ${ fileSizeLimit } ) {
110- throw new Error('File size for ${ imgName } image " ${ resourcePath } " exceeds ${ fileSizeLimit } MB. ' +
108+ throw new Error('File size for ${ imgName } image ${ JSON . stringify ( resourcePath ) } exceeds ${ fileSizeLimit } MB. ' +
111109 \`(Current: \${fileSizeInMB.toFixed(2)}MB)\n\` +
112110 'Read more: https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image#image-files-jpg-png-gif'
113111 )
You can’t perform that action at this time.
0 commit comments