-
Notifications
You must be signed in to change notification settings - Fork 83
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
Does not work together with the new Backbone 1.1.1 #114
Comments
Yeah, I wish that backbone didn't release it as 1.1.1. It should not be a patch version bump. Minor at least. |
Couldn't you just limit the use of Backbone to <= 1.1.0 in bower.json as a HOTFIX? |
Just for the record: I totally agree with you, that the AMD compatibility is a huge change and should not be reflected by a minor version bump. |
Unfortunately, that project is not interested in semver. |
It seems to work for me. See https://gist.github.com/gkatsev/9096687 |
So far, so good, ya. The problems occurs when you start to concat and minify the js to one single main.js file with requirejs. Even if you define a shim for backbone-nested-model, somehow Backbone does not get defined in the global namespace and is therefore not defined for Backbone.NestedModel. I didn't get into much research. As a hotfix I downgraded to Backbone 1.1.0, but maybe today I get the chance to dig a little deeper. |
I wonder if the AMD stuff get mangled and thus become useless. |
Checkout https://github.com/xoss/backbone-nested-model-AMD
Replace "backbone":"1.1.1." by "backbone":"1.1.0" in bower.json. Run the same procedure. 3. => works as well. |
You can use new feature in requirejs - wrapShim to resolve this problem for build |
Although would be better to support it in backbone-nested |
Since Backbone 1.1.1, Backbone is AMD compatible. This, unfortunately, led to a not working backbone nested model, in case js has been concatinated and minified for production.
Chrome yields: 'Uncaught Error: Backbone is not defined'
The text was updated successfully, but these errors were encountered: