@@ -58,7 +58,7 @@ export function openNextEdgePlugins({
58
58
logger . debug ( chalk . blue ( "OpenNext Edge plugin" ) ) ;
59
59
if ( edgeFunctionHandlerPath ) {
60
60
// If we bundle the routing, we need to resolve the middleware
61
- build . onResolve ( { filter : / \. \/ m i d d l e w a r e .m j s / g } , ( ) => {
61
+ build . onResolve ( { filter : / \. ( \/ | \\ ) m i d d l e w a r e .m j s / g } , ( ) => {
62
62
return {
63
63
path : edgeFunctionHandlerPath ,
64
64
} ;
@@ -93,7 +93,7 @@ export function openNextEdgePlugins({
93
93
) ;
94
94
95
95
// We inject the entry files into the edgeFunctionHandler
96
- build . onLoad ( { filter : / \/ e d g e F u n c t i o n H a n d l e r .j s / g } , async ( args ) => {
96
+ build . onLoad ( { filter : / ( \/ | \\ ) e d g e F u n c t i o n H a n d l e r .j s / g } , async ( args ) => {
97
97
let contents = readFileSync ( args . path , "utf-8" ) ;
98
98
contents = `
99
99
globalThis._ENTRIES = {};
@@ -160,7 +160,7 @@ ${contents}
160
160
} ;
161
161
} ) ;
162
162
163
- build . onLoad ( { filter : / a d a p t e r s \/ c o n f i g \/ i n d e x / g } , async ( ) => {
163
+ build . onLoad ( { filter : / a d a p t e r s ( \/ | \\ ) c o n f i g ( \/ | \\ ) i n d e x / g } , async ( ) => {
164
164
const NextConfig = loadConfig ( nextDir ) ;
165
165
const BuildId = loadBuildId ( nextDir ) ;
166
166
const HtmlPages = loadHtmlPages ( nextDir ) ;
0 commit comments