I'm developing a JavaScript plugin for webshops which is module based and I'm using require.js as module loader to integrate it into the customer's HTML template.
The idea behind that is to let the customer put only one line of code into their template and everything is loaded automatically.
I get problems when the webshop has third party scripts which define themself anonymously as AMD module but are included by a separate <script>
tag. In this case I get errors like:
Uncaught Error: Mismatched anonymous define() module:
[..]
http://requirejs.org/docs/errors.html#mismatch
There is no way to me to take influence on that. It is also not possible for me to influence where in the template my one-liner is put by our customers.
Is there a way to tell require.js to just focus on the modules I name in my code and to ignore any other referenced module-define JavaScripts?