I'm using RequireJS (the jQuery version) and I want to append GET parameters to my scripts to prevent unwanted caching.
I'm using the urlArgs parameter, as suggested in the docs. This is my app-build.js
file:
({
appDir: "../",
baseUrl: "scripts/",
urlArgs: "cache=v2",
...
Then I build the project as follows:
$ node ../../r.js -o app.build.js
The output in app-build directory now contains both require-jquery.js
, which is the same file as previously, and require-jquery.js?cache=v2
, which is blank.
The index.html
file doesn't seem to have any references to cache=v2
. And when I load the page in a browser, I don't see any cache=v2
parameters appended to any of the scripts.
Am I doing something wrong?