Skip to content

Commit 6dbd719

Browse files
committed
utility
1 parent 9946ecf commit 6dbd719

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

packages/open-next/src/plugins/edge.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import {
1919
loadRoutesManifest,
2020
} from "../adapters/config/util.js";
2121
import logger from "../logger.js";
22+
import { normalizePath } from "../utils/normalize-path.js";
2223
import { getCrossPlatformPathRegex } from "../utils/regex.js";
2324

2425
export interface IPluginSettings {
@@ -40,7 +41,7 @@ export function openNextEdgePlugins({
4041
}: IPluginSettings): Plugin {
4142
const entryFiles =
4243
middlewareInfo?.files.map((file: string) =>
43-
path.join(nextDir, file).replace(/\\/g, "/"),
44+
normalizePath(path.join(nextDir, file)),
4445
) ?? [];
4546
const routes = middlewareInfo
4647
? [
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export function normalizePath(path: string) {
2+
return path.replace(/\\/g, "/");
3+
}

0 commit comments

Comments
 (0)