Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
UNDERSCORE_GLOBAL_ERROR_ROUTE,
UNDERSCORE_NOT_FOUND_ROUTE,
} from '../../../shared/lib/entry-constants'
import { normalizePathSep } from '../../../shared/lib/page-path/normalize-path-sep'

interface RouteInfo {
path: string
Expand Down Expand Up @@ -170,10 +171,12 @@ export async function createRouteTypesManifest({
const getRelativePath = (filePath: string) => {
if (validatorFilePath) {
// For validator generation, calculate path relative to validator directory
return path.relative(path.dirname(validatorFilePath), filePath)
return normalizePathSep(
path.relative(path.dirname(validatorFilePath), filePath)
)
}
// For other uses, calculate path relative to project directory
return path.relative(dir, filePath)
return normalizePathSep(path.relative(dir, filePath))
}

const manifest: RouteTypesManifest = {
Expand Down
Loading