File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,11 @@ export function createInternalRouter(
106106 cachedModule . set ( route . relativePath , preloadedModules . get ( route . relativePath ) ) ;
107107 } else if ( ! cachedModule . has ( route . relativePath ) ) {
108108 const foundFile = findFile ( join ( routesDirectory , route . relativePath ) , builtMap ) ;
109- cachedModule . set ( route . relativePath , await dynamicImport ( foundFile ) ) ;
109+ let mod = await dynamicImport ( foundFile ) ;
110+
111+ mod = await pluginRunner . execute ( 'generateRoute' , mod ) ;
112+
113+ cachedModule . set ( route . relativePath , mod ) ;
110114 }
111115
112116 const pageModule = cachedModule . get ( route . relativePath ) ;
@@ -115,7 +119,7 @@ export function createInternalRouter(
115119
116120 try {
117121 const method = ( req . method || '' ) . toLowerCase ( ) ;
118- const handlers : PageType = await pluginRunner . execute ( 'generateRoute' , pageModule ) ;
122+ const handlers : PageType = pageModule ; // await pluginRunner.execute('generateRoute', pageModule);
119123
120124 const execute = async ( handler : HandlerType ) => {
121125 if ( typeof handler !== 'function' ) return res . send ( handler ) ;
You can’t perform that action at this time.
0 commit comments