File tree Expand file tree Collapse file tree 2 files changed +1215
-1
lines changed
open-next/src/build/patch
tests-unit/tests/build/patch Expand file tree Collapse file tree 2 files changed +1215
-1
lines changed Original file line number Diff line number Diff line change 4747 '{}'
4848` ;
4949
50- const envVarRuleCreator = ( envVar : string , value : string ) => `
50+ // This rule is mostly for splitted edge functions so that we don't try to match them on the other non edge functions
51+ export const removeMiddlewareManifestRule = `
52+ rule:
53+ kind: statement_block
54+ inside:
55+ kind: method_definition
56+ has:
57+ kind: property_identifier
58+ regex: getMiddlewareManifest
59+ fix:
60+ '{return null;}'
61+ ` ;
62+
63+ export const envVarRuleCreator = ( envVar : string , value : string ) => `
5164rule:
5265 kind: member_expression
5366 pattern: process.env.${ envVar }
@@ -77,6 +90,14 @@ export const patchNextServer: CodePatcher = {
7790 patchCode : createPatchCode ( disablePreloadingRule ) ,
7891 } ,
7992 } ,
93+ {
94+ versions : ">=15.0.0" ,
95+ field : {
96+ pathFilter : / n e x t - s e r v e r \. ( j s ) $ / ,
97+ contentFilter : / g e t M i d d l e w a r e M a n i f e s t / ,
98+ patchCode : createPatchCode ( removeMiddlewareManifestRule ) ,
99+ } ,
100+ } ,
80101 ] ,
81102} ;
82103
You can’t perform that action at this time.
0 commit comments