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 {
1919 loadRoutesManifest ,
2020} from "../adapters/config/util.js" ;
2121import logger from "../logger.js" ;
22+ import { normalizePath } from "../utils/normalize-path.js" ;
2223import { getCrossPlatformPathRegex } from "../utils/regex.js" ;
2324
2425export interface IPluginSettings {
@@ -39,7 +40,9 @@ export function openNextEdgePlugins({
3940 isInCloudflare,
4041} : IPluginSettings ) : Plugin {
4142 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+ ) ?? [ ] ;
4346 const routes = middlewareInfo
4447 ? [
4548 {
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