File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
packages/next/src/server/lib/router-utils Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ import {
1717 isInterceptionRouteAppPath ,
1818} from '../../../shared/lib/router/utils/interception-routes'
1919
20+ import { normalizePathSep } from '../../../shared/lib/page-path/normalize-path-sep'
21+
2022interface RouteInfo {
2123 path : string
2224 groups : { [ groupName : string ] : Group }
@@ -166,10 +168,12 @@ export async function createRouteTypesManifest({
166168 const getRelativePath = ( filePath : string ) => {
167169 if ( validatorFilePath ) {
168170 // For validator generation, calculate path relative to validator directory
169- return path . relative ( path . dirname ( validatorFilePath ) , filePath )
171+ return normalizePathSep (
172+ path . relative ( path . dirname ( validatorFilePath ) , filePath )
173+ )
170174 }
171175 // For other uses, calculate path relative to project directory
172- return path . relative ( dir , filePath )
176+ return normalizePathSep ( path . relative ( dir , filePath ) )
173177 }
174178
175179 const manifest : RouteTypesManifest = {
You can’t perform that action at this time.
0 commit comments