jrburke/requirejs — pull request #240 by jorgepedret (2012-04-19 23:43:36+00:00)
Title: Public function to update the included URL

Added a function to allow users a last chance to modify the resource that is being included. The function is defined in the require.config as urlFilter.

I know it's not the most elegant solution, but I couldn't find any other way to do it. I tried creating a plugin, but then I'd have to call it on every single require/define call.

In my case, the url of the files on my development environment are different than the url of the files in production environment: i.e.:
development = /assets/js/main.js
production = /assets/js/main.min.js.gz (minified and compressed)

If my solution is not valid, what would you suggest?

Thanks!