I have an application, written in Backbone with Marionette and some other dependencies, managed through bower :
{
"name": "admin",
"version": "0.1.1",
"main": "public/javascripts/app.js",
"dependencies": {
"lodash": "~2.4.1",
"console-polyfill": "~0.1.0",
"jquery": "~2.1.1",
"normalize-css": "~2.1.2",
"marionette": "~1.7.4",
"bootstrap": "~3.1.1",
"font-awesome": "~4.1.0",
"backbone-pageable": "~1.4.5",
"moment": "~2.5.1",
"swag": "~0.6.1",
"jquery-form": "~3.46.0",
"jquery-file-upload": "~9.5.7",
"underscore.string": "~2.3.3",
"bootstrap-switch": "~3.0.1",
"joint": "~0.9.0"
},
"overrides": {
"backbone": {
"dependencies": {
"lodash": "*",
"jquery": "*"
},
"main": "backbone.js"
},
"backbone.wreqr": {
"dependencies": {
"backbone": "*"
},
"main": "lib/amd/backbone.wreqr.js"
},
"backbone-pageable": {
"dependencies": {
"backbone": "*"
},
"main": "lib/backbone-pageable.js"
},
"jquery-file-upload": {
"dependencies": {
"jquery": "*"
},
"main": [
"js/vendor/jquery.ui.widget.js",
"js/jquery.iframe-transport.js",
"js/jquery.fileupload.js"
]
},
"underscore.string": {
"dependencies": {
"lodash": "*"
},
"main": "lib/underscore.string.js"
},
"joint": {
"dependencies": {
"lodash": "*"
},
"main": "dist/joint.clean.js"
}
},
"resolutions": {
"jquery": "~2.1.1"
}
}
I want to add Joint.js(http://www.jointjs.com/), which depends on lodash (a replacement for underscore), but I can't figure out how to replace this in my configuration, since Marionette, Backbone, and some other libraries depend on underscore directly. So on the load underscore overrides lodash, and application can't start correctly.
lodash
overwriteunderscore
? Their API should be compatible. – Brilliance