Expose lodash in the amd fork of the UMD in case it's being loaded with a shim config. [closes #400]

This commit is contained in:
John-David Dalton
2013-11-19 09:24:12 -08:00
parent a904e54122
commit d95e577639
9 changed files with 29 additions and 16 deletions

View File

@@ -4898,6 +4898,11 @@
// some AMD build optimizers like r.js check for condition patterns like the following:
if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {
// Expose Lo-Dash to the global object even when an AMD loader is present in
// case Lo-Dash is loaded with a RequireJS shim config.
// See http://requirejs.org/docs/api.html#config-shim
root._ = lodash;
// define as an anonymous module so, through path mapping, it can be
// referenced as the "underscore" module
define(function() {