mirror of
https://github.com/nocobase/nocobase
synced 2024-11-16 04:25:10 +00:00
ecf82208eb
* refactor(plugin-workflow): abstract to classes * fix(plugin-workflow): add indexes and fix cases * test(plugin-workflow): skip schedule cases
12 lines
261 B
TypeScript
12 lines
261 B
TypeScript
export function requireModule(module: any) {
|
|
if (typeof module === 'string') {
|
|
module = require(module);
|
|
}
|
|
if (typeof module !== 'object') {
|
|
return module;
|
|
}
|
|
return module.__esModule ? module.default : module;
|
|
}
|
|
|
|
export default requireModule;
|