diff --git a/lib/routes.ts b/lib/routes.ts index c6ad7286dc..e68af2c88c 100644 --- a/lib/routes.ts +++ b/lib/routes.ts @@ -13,7 +13,7 @@ type Root = { const routes: Record void> = {}; if (process.env.NODE_ENV === 'test') { - routes.test = require('./routes/test/router').default; + routes.test = (await import('./routes/test/router')).default; } else { const imports = directoryImport({ targetDirectoryPath: path.join(__dirname, './routes'),