(moduleId)
| 1 | import importCwd from 'import-cwd' |
| 2 | |
| 3 | export function loadModule(moduleId) { |
| 4 | // Trying to load module normally (relative to plugin directory) |
| 5 | try { |
| 6 | return require(moduleId) |
| 7 | } catch { |
| 8 | // Ignore error |
| 9 | } |
| 10 | |
| 11 | // Then, trying to load it relative to CWD |
| 12 | return importCwd.silent(moduleId) |
| 13 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…