Our team is facing a unique challenge with our AngularJS app. The app does not utilize RequireJS, yet it is being loaded within an existing site that does use RequireJS. As part of the build process, we are minifying and concatenating all scripts into a single JS file, which includes vendor libraries like Lodash and Moment.
While the app runs smoothly in isolation, when integrated within the parent application, we encounter a well-documented error as described here:
Uncaught Error: Mismatched anonymous define() module: function () { return _; }
Since we do not have control over the parent application, we are exploring ways to "disable" RequireJS or configure it to ignore our scripts at runtime. Our current workaround involves modifying the vendor libraries by removing the AMD code. However, this approach is less than ideal as we prefer automated dependency updates through Bower (using grunt-bower-install) rather than relying on manual adjustments and custom solutions.