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 {
17
17
isInterceptionRouteAppPath ,
18
18
} from '../../../shared/lib/router/utils/interception-routes'
19
19
20
+ import { normalizePathSep } from '../../../shared/lib/page-path/normalize-path-sep'
21
+
20
22
interface RouteInfo {
21
23
path : string
22
24
groups : { [ groupName : string ] : Group }
@@ -166,10 +168,12 @@ export async function createRouteTypesManifest({
166
168
const getRelativePath = ( filePath : string ) => {
167
169
if ( validatorFilePath ) {
168
170
// 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
+ )
170
174
}
171
175
// For other uses, calculate path relative to project directory
172
- return path . relative ( dir , filePath )
176
+ return normalizePathSep ( path . relative ( dir , filePath ) )
173
177
}
174
178
175
179
const manifest : RouteTypesManifest = {
You can’t perform that action at this time.
0 commit comments