Changed from
All checks were successful
Publish to Private NPM Registry / publish (push) Successful in 35s

This commit is contained in:
Alan Bridgeman 2026-01-08 15:48:38 -06:00
parent 184ac9247d
commit ed4c8b28da

View file

@ -87,7 +87,12 @@ export class Router {
} }
// Load the file as a module // Load the file as a module
const controllerModule = require(controllerPath); const moduleNamespace = await import(controllerPath);
// When you import() a file, you get a "Module Namespace Object".
// If the file used 'module.exports = Class' or 'export default Class',
// your class is now inside the '.default' property.
const controllerModule = moduleNamespace.default || moduleNamespace;
logMessage(`${controllerPath} loaded successfully: ${JSON.stringify(Object.keys(controllerModule))} exports found.`, LogLevel.DEBUG); logMessage(`${controllerPath} loaded successfully: ${JSON.stringify(Object.keys(controllerModule))} exports found.`, LogLevel.DEBUG);