Skip to content

Instantly share code, notes, and snippets.

@jgatjens
Last active December 17, 2015 17:09
Show Gist options
  • Save jgatjens/5644276 to your computer and use it in GitHub Desktop.
Save jgatjens/5644276 to your computer and use it in GitHub Desktop.
Using the shim for non-AMD libraries and cdn calls.
require.config({
paths: {
// use cdn default | fall back local copy
"jquery": [
'//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.0/jquery.min.js',
'lib/jquery'
]
"backbone": "vendor/backbone",
"underscore": "vendor/underscore"
},
shim: {
"backbone": {
deps: [ "underscore" ],
exports: "Backbone"
},
"underscore": {
exports: "_"
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment