Dependency Management Got Awesome CommonJS and AMD Compliant dependency loader for modern web apps



OLD: This is an old version of documentation. You probably want the most recent version of this document, from the sidebar on the right.

Deprecation Warning: This method is deprecated and will be removed in a future version. Please see the documentation below for the new methods or APIs to replace this (if applicable). You may also access the another version of the documentation that may contain this method: [0.4.x] [0.4.x] [0.4.x]

Inject.addRule(/regexMatch/?, weight?, { /* options */ });
Inject.addRule('string'?, weight?, { /* options */ });
Inject.addRule(/regexMatch/?, { /* options */ });
Inject.addRule('string'?, { /* options */ });

This is now a DEPRECATED call.

Please use one of the following methods:

  • Inject.addModuleRule to replace path based rules where the intent was just to change the module’s resolved ID.
  • Inject.addFileRule to replace path based rules where the intent was to change the final URL used for the module ID.
  • Inject.addFetchRule a new rule, used to change the fetching mechanism used for a resolved Module ID. (previously, this was internalized in plugins, but has been made directly available)
  • Inject.addContentRule to replace the afterFetch pointcut
  • Inject.addPackage to create global aliases for a module while still maintaining its original resolved location
comments powered by Disqus