miracle2k/flask-assets — Issue #14: Strange behavior of JST filter with cache=False, updater=Always
Author: sean-lynch
Created: 2012-02-10 01:21:49+00:00
State: open

See https://github.com/sean-lynch/flask-assets-issues/blob/master/1/app.py for an example

If an environment has both assets.updater = 'always' and assets.cache = False, the JST file generated breaks itself after the second time the page is loaded. In the example, the first time the bundle is generated, the result is:

window.JST = window.JST || {};
var template = function(str){/* ... common JST code ... */};
window.JST['template'] = template('

Foobar

');

When the page is refreshed and the bundle is generated a second time, it becomes:

window.JST = window.JST || {};
var template = function(str){/* ... common JST code ... */};
window.JST[''] = template('

Foobar

');
window.JST[''] = template('

Foobar

');

Couldn't replicate this using webassets directly.