My team and I have an AngularJS application that does not use RequireJS but loads in the context of an existing site that uses RequireJS. During the build process, I minimize / merge all our scripts into one JS file, which includes certain vendor libraries, such as Lodash, Moment, etc.
Starting a site isolated from the parent is fine, but in the context of the parent application, I get a well-documented error :
Uncaught Error: Mismatched anonymous define() module: function () { return _; }
I have no control over the parent application, is there a way at runtime to disable "RequireJS" or configure it to ignore my scripts?
The current solution we have is to modify the vendor libraries and remove the AMD code, but this is undesirable because we use Bower (with grunt-bower-install ) and would like to just update the dependencies automatically, rather than relying on manual processes and user-defined ones khaki.
Terry source
share