Skip to content

Instantly share code, notes, and snippets.

@junosuarez
Created June 7, 2012 05:11
Show Gist options
  • Save junosuarez/2886716 to your computer and use it in GitHub Desktop.
Save junosuarez/2886716 to your computer and use it in GitHub Desktop.
Example using RequireJS 2.x.x shim configuration option to load a non-AMD library as a module
/*global require, window */
require.config({
shim: {
'underscore': {
deps: ['underscore.js'],
exports: function () {
return this._.noConflict();
}
}
}
});
require(['underscore'], function (_) {
console.log(_.VERSION);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment