Created
November 14, 2012 15:32
-
-
Save cmsd2/4072785 to your computer and use it in GitHub Desktop.
Modify r.js to evaluate at compile time functions loaded by plugins.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/node_modules/requirejs/bin/r.js b/node_modules/requirejs/bin/r.js | |
index f2b8faa..9451e32 100644 | |
--- a/node_modules/requirejs/bin/r.js | |
+++ b/node_modules/requirejs/bin/r.js | |
@@ -1065,7 +1065,9 @@ var requirejs, require, define; | |
} | |
load = bind(this, function (value) { | |
- this.init([], function () { return value; }, null, { | |
+ var factory = function () { return value; }; | |
+ factory.__requireJsBuild = true; | |
+ this.init([], factory, null, { | |
enabled: true | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment