Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building with r.js #169

Open
mcaple opened this issue Oct 25, 2013 · 1 comment
Open

Building with r.js #169

mcaple opened this issue Oct 25, 2013 · 1 comment

Comments

@mcaple
Copy link

mcaple commented Oct 25, 2013

I have noticed that when I build with r.js into a single file I always get the message 'Please include Backbone.ModelBinder.js before Backbone.CollectionBinder.js' although requirejs works fine before the build when multiple files are loaded. I have realised that CollectionBinder makes a call to the anonymous function doing

.call(this, _, jQuery, Backbone)

whereas ModelBinder does not do this so that although ModelBinder is being loaded before CollectionBinder the code to create the ModelBinder attributes has not been run. I have changed my ModelBinder signature to look the same as CollectionBinder and added the

.call(this, _, jQuery, Backbone)

now it works fine. Not sure if this call should be handled by requirejs but would like some clarification of a long term fix.

Many thanks

@bharatpatil
Copy link

I guess this is duplicate of #111

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants