-
Matt Crinklaw-Vogt authored
This plan allows us to run requirejs apps without building them! Exported packages get written into requirejs.config({paths:...}); This allows a consumer to do: require(['package/name/class'], function(Klass) { }); and package/name gets re-written to the actual path as defined in the requirejs.config. The paths are determined by using a config.js that lists the bundles we want and the location of an rmap file. The rmap is loaded and the rmap contains a mapping from bundle name to bundle location / path. Needed bundles are loaded and their manifest.js is read. The exported packages in manifest.js are read and used to configure requirejs.config({paths:}) basically we stick the package names as keys in paths and bundle-location + package name as the values. i.e., we can import package/name/class and that gets re-written to bundle-location/package/name/class because of the pathing rules in requirejs. Packages must be separated by '/' and not '.' due to how requirejs handles path mapping.
f93fb199