Skip to content

Commit

Permalink
[PATCH] r.js for uncached resource downloads
Browse files Browse the repository at this point in the history
  • Loading branch information
thet committed Jan 5, 2020
1 parent c33d553 commit 4e4f90e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/plone/staticresources/static/webcompiler/r.js
Original file line number Diff line number Diff line change
Expand Up @@ -25821,7 +25821,16 @@ define('build', function (require) {
d.resolve(require._cachedRawText[path]);
return d.promise;
} else {
return file.readFileAsync(path, encoding).then(function (text) {

/* XXX Plone hack to always re-download resource TTW */
var url = path;
if(url.indexOf('?') === -1){
url += '?';
}else{
url += '&';
}
url = url + "bust=" + (new Date()).getTime();
return file.readFileAsync(url, encoding).then(function (text) {
require._cachedRawText[path] = text;
return text;
});
Expand Down

0 comments on commit 4e4f90e

Please sign in to comment.