backbone-pageable without AMD and CommonJs
skynet-tx opened this issue · 3 comments
Good Day!
I have a suggestion.
People ask about it
#62
#58
All problem inside the module:
// AMD
else if (typeof define == "function" && define.amd) {
define(["lo-dash", "Backbone"], factory);
}
I'm using "lo-dash" library but in the module used "underscore" library.
// AMD
else if (typeof define == "function" && define.amd) {
define(["lo-dash", "Backbone"], factory);
}
It's wrong to change module. Fix this problem, please!
Both of the issues you referenced are unrelated to your problem, which is you are trying to use lodash instead of underscore. pageable has a hard dependency on underscore. There's no plan to change that and unlikely there will ever be as Backbone already has a hard dependency on underscore.
Lodash can be used instead of Underscore, so the dependency is on Underscore's api, not the library itself. Please do not make this dependency on Backbone.Paginator, since you are merging that with this tool.
Just for the record adding a map to requirejs will get pageable to work with lodash:
map: {
'*': {
'underscore': 'lodash'
}
},