Exports the default loadPlugins utility method as mapp.utils.loadPlugins().
- Source
Methods
(inner) loadPlugins(plugins, endsWith) → {Promise}
The loadPlugins utility method receives an array argument of src string locations.
The method creates an array of promises to load each plugin from the provided source.
All import promises must be resolved for the loadPlugins method to resolve.
The endsWith argument can be used to provide an array of string conditions on which the plugin src string must end to be loaded.
Parameters:
Name | Type | Description |
---|---|---|
plugins | Array | Array of plugin src location strings. |
endsWith | Array | Array of strings to limit which plugins should be loaded. Defaults to ['.js','.mjs'] |
- Source
Returns:
The promise returned from the method will resolve once all [plugin] import promises are settled.
- Type:
- Promise