Open ghost opened 9 years ago
I am very sorry, but I am a bit confused about this. Could you include a code snippet to help me understand? If you'd like to implement the changes yourself, feel free to submit a PR. I'd be happy to review them.
I mean you can just require google analytics with requirejs like this var analytics = require('//www.google-analytics.com/analytics.js');’ or define it in
paths` config, but you can't download it to use with almond, because amd-optimize does not support remote scripts.
maybe it could help http://requirejs.org/docs/optimization.html#empty
In one of projects, we are required to use some third-party trackers, like google analytics. With requirejs it is just possible to provide a config file aliasing them to some dependency in paths. That forces us to use full requirejs instead of almond because frequent changes in remote trackers could fail anything. WIth amd-optimize, however, it fails when the remote script is in config.
I propose to replace aliases with full uri's from config and leave them to requirejs to handle.