Exports the default loadPlugins utility method as mapp.utils.loadPlugins().

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:
NameTypeDescription
pluginsArray

Array of plugin src location strings.

endsWithArray

Array of strings to limit which plugins should be loaded. Defaults to ['.js','.mjs']

Returns:

The promise returned from the method will resolve once all [plugin] import promises are settled.

Type: 
Promise