I'm getting some odd behaviors loading breezejs in an application that also uses requirejs.
The main issue is that if I setup require to load breeze (plus its dependencies q and jquery), breeze fails to load unless knockout is setup as a dependency of breeze.
Uncaught Error: Module name "ko" has not been loaded yet for context: _. Use require([])
That's fine if I actually wanted to use knockout, but I'm using angular. I guess it doesn't break anything to load knockout too, but it's a waste of time to download if it's never going to get used.
So, my first question is why does breeze require knockout just because I'm using requirejs? Seems like a bug to me.
The other odd behavior WRT breeze and require is that if I load require and then breeze without using require, then breeze fails to load.
Uncaught Error: Mismatched anonymous define() module...
Seems that breeze makes the assumption that if require is loaded, that breeze will be loaded by require. But, this seems like a leap to assume. I ran into this issue since I first discovered the previous issue. I thought I'd just load breeze myself instead of having require do it. Of course, was still loading require since other parts of the app rely on require.
So, my second question is why does breeze have to be loaded before require? Just seems odd since the two libraries don't depend on each other. Why is there a required load order?