Dependency Management Got Awesome
CommonJS and AMD Compliant dependency loader for modern web apps
Inject.enableAMDPlugins
0.6.x
OLD: This is an old version of documentation. You probably want the most recent version of this
document, from the sidebar on the right.
Inject.enableAMDPlugins();
By default in Inject, the use of AMD Plugins is disabled by default. This reduces the total execution time of modules and improves performance in runtime environments.
However, if you’d like to use AMD plugins, they can be accomplished by calling the enableAMDPlugins
method. This method adds a rule to Inject, which enables the plugin!parameters
syntax commonly used by AMD style plugins. Internally, it is adding a Fetch Rule in order to intercept the module call, load the plugin, and process the module.
Due to the complexity of the rule, AMD Plugins cannot currently be turned off once enabled.