Fix windows fill metadata dynamic path (#51885)
Fixes #51583 Fixes NEXT-1315
This commit is contained in:
parent
252c5a6908
commit
a54d08bd50
1 changed files with 2 additions and 1 deletions
|
@ -14,6 +14,7 @@ import { getImageSize } from '../../../server/image-optimizer'
|
|||
import { imageExtMimeTypeMap } from '../../../lib/mime-type'
|
||||
import { fileExists } from '../../../lib/file-exists'
|
||||
import { WEBPACK_RESOURCE_QUERIES } from '../../../lib/constants'
|
||||
import { normalizePathSep } from '../../../shared/lib/page-path/normalize-path-sep'
|
||||
|
||||
interface Options {
|
||||
segment: string
|
||||
|
@ -51,7 +52,7 @@ async function nextMetadataImageLoader(this: any, content: Buffer) {
|
|||
const isDynamicResource = pageExtensions.includes(extension)
|
||||
const pageSegment = isDynamicResource ? fileNameBase : interpolatedName
|
||||
const hashQuery = contentHash ? '?' + contentHash : ''
|
||||
const pathnamePrefix = path.join(basePath, segment)
|
||||
const pathnamePrefix = normalizePathSep(path.join(basePath, segment))
|
||||
|
||||
if (isDynamicResource) {
|
||||
const mod = await new Promise<webpack.NormalModule>((res, rej) => {
|
||||
|
|
Loading…
Reference in a new issue