(function(){ if (typeof Neft === 'undefined'){ throw "Neft framework is not included"; } var global = window; {{#buildServerUrl}} (function(){ function watchOnBundle() { var xhr = new XMLHttpRequest; xhr.open("get", "{{&buildServerUrl}}/onNewBundle/html", true); xhr.onload = function () { if (this.responseText == '') { location.href = location.href; return; } watchOnBundle(); app.reload(JSON.parse(this.responseText).hotReloads); }; xhr.onerror = function () { setTimeout(watchOnBundle, 1000); }; xhr.send(); } watchOnBundle(); }()); {{/buildServerUrl}} {{&appCode}} }());