假设我处于以下情况。
我需要使用
backbone
which requires和underscore
which requires , jquery
and
backbone.marionette
backbone
underscore
jquery
我应该写这个代码(1)还是下面的(2)
(1)
shim: {
backbone: {
deps: ['underscore', 'jquery'],
exports: 'Backbone'
},
marionette: {
deps: ['backbone', 'underscore', 'jquery'],
exports: 'marionette'
},
}
(2)
shim: {
backbone: {
deps: ['underscore', 'jquery'],
exports: 'Backbone'
},
marionette: {
deps: ['backbone'],
exports: 'marionette'
},
}