How to implement lodash with new version of BB 1.1.1 or 1.1.2, which has AMD wrapper? And how to exports Backbone into global scope, with requirejs?
1.1.0 - without amd wrapper, works good. Thnk's.
If you have libraries that depend on lodash explicitly, such as lodash-template-loader, you will need to use this:
paths: {
lodash: <path to lodash>,
....
},
map: {
"*": {
"underscore": "lodash"
}
}
At that point, any dependency on underscore will load lodash instead, and the template loader will work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With