File tree Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @opennextjs/aws " : patch
3
+ ---
4
+
5
+ fix edge middleware path on windows
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import {
19
19
loadRoutesManifest ,
20
20
} from "../adapters/config/util.js" ;
21
21
import logger from "../logger.js" ;
22
+ import { normalizePath } from "../utils/normalize-path.js" ;
22
23
import { getCrossPlatformPathRegex } from "../utils/regex.js" ;
23
24
24
25
export interface IPluginSettings {
@@ -39,7 +40,9 @@ export function openNextEdgePlugins({
39
40
isInCloudflare,
40
41
} : IPluginSettings ) : Plugin {
41
42
const entryFiles =
42
- middlewareInfo ?. files . map ( ( file : string ) => path . join ( nextDir , file ) ) ?? [ ] ;
43
+ middlewareInfo ?. files . map ( ( file : string ) =>
44
+ normalizePath ( path . join ( nextDir , file ) ) ,
45
+ ) ?? [ ] ;
43
46
const routes = middlewareInfo
44
47
? [
45
48
{
Original file line number Diff line number Diff line change
1
+ export function normalizePath ( path : string ) {
2
+ return path . replace ( / \\ / g, "/" ) ;
3
+ }
You can’t perform that action at this time.
0 commit comments