steal.import
{function()}
Dynamically imports modules after initial configuration has loaded. Otherwise works very similar to steal.loader.import.
steal.import(...moduleName)
Parameters
-
moduleName
{moduleName}
Names of modules wanting to import.
Returns
{Promise}
A promise that will resolve with the values of the imported modules.
Use
steal.import
is useful for dynamically importing modules. It is like steal.loader.import but with 2 advantages:moduleName
, so if configuration is needed it will work.Browser
Node
steal.import
is useful in Node for the same reason, as it prevents having to callsteal.startup
prior to importing the modules you care about.