File tree 1 file changed +6
-2
lines changed
packages/next/src/build/webpack/loaders
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,11 @@ export default async function middlewareLoader(this: any) {
38
38
middlewareConfig : middlewareConfigBase64 ,
39
39
} : MiddlewareLoaderOptions = this . getOptions ( )
40
40
const matchers = encodedMatchers ? decodeMatchers ( encodedMatchers ) : undefined
41
- const stringifiedPagePath = stringifyRequest ( this , absolutePagePath )
41
+ const pagePath = this . utils . contextify (
42
+ this . context || this . rootContext ,
43
+ absolutePagePath
44
+ )
45
+
42
46
const middlewareConfig : MiddlewareConfig = JSON . parse (
43
47
Buffer . from ( middlewareConfigBase64 , 'base64' ) . toString ( )
44
48
)
@@ -57,7 +61,7 @@ export default async function middlewareLoader(this: any) {
57
61
}
58
62
59
63
return await loadEntrypoint ( 'middleware' , {
60
- VAR_USERLAND : stringifiedPagePath ,
64
+ VAR_USERLAND : pagePath ,
61
65
VAR_DEFINITION_PAGE : page ,
62
66
} )
63
67
}
You can’t perform that action at this time.
0 commit comments