Skip to content

Commit

Permalink
fix: webpack build error on Windows (vercel#71943)
Browse files Browse the repository at this point in the history
  • Loading branch information
elitalpa authored and stipsan committed Nov 6, 2024
1 parent 9ec6e6b commit d459209
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ async function getStaticAssetRouteCode(
resourcePath: string,
fileBaseName: string
) {
resourcePath = path.posix.normalize(resourcePath)

const cache =
fileBaseName === 'favicon'
? 'public, max-age=0, must-revalidate'
Expand Down Expand Up @@ -107,7 +105,7 @@ const buffer = Buffer.from(${JSON.stringify(
if (${isTwitter || isOpenGraph}) {
const fileSizeInMB = buffer.byteLength / 1024 / 1024
if (fileSizeInMB > ${fileSizeLimit}) {
throw new Error('File size for ${imgName} image "${resourcePath}" exceeds ${fileSizeLimit}MB. ' +
throw new Error('File size for ${imgName} image ${JSON.stringify(resourcePath)} exceeds ${fileSizeLimit}MB. ' +
\`(Current: \${fileSizeInMB.toFixed(2)}MB)\n\` +
'Read more: https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image#image-files-jpg-png-gif'
)
Expand Down

0 comments on commit d459209

Please sign in to comment.