Currently, loadConfig only accepts a file path. However, an equally reasonable approach is to pass the array of plugin definitions directly to loadConfig.
loadConfig supports a JS file, but it requires synchronous loading and return of the plugin list directly via module.exports, which may not be feasible in all applications.
Proposed change adds the following capability:
loadConfig(configArray, base, [callback])
configArray array of plugins to load with their configuration
Currently,
loadConfig
only accepts a file path. However, an equally reasonable approach is to pass the array of plugin definitions directly toloadConfig
.loadConfig
supports a JS file, but it requires synchronous loading and return of the plugin list directly via module.exports, which may not be feasible in all applications.Proposed change adds the following capability:
loadConfig(configArray, base, [callback])
configArray
array of plugins to load with their configurationbase
location to use as the base for pluginscallback
an (optional) callbackPR inbound.