mirror of
https://github.com/rr-/szurubooru.git
synced 2025-07-17 08:26:24 +00:00
Improve compilation speed for development builds (#402)
* Improve incremental build times * Live-reloading in development mode
This commit is contained in:
@ -1,5 +1,20 @@
|
||||
"use strict";
|
||||
|
||||
const config = require("./config.js");
|
||||
|
||||
if (config.environment == "development") {
|
||||
var ws = new WebSocket("ws://" + location.hostname + ":8080");
|
||||
ws.addEventListener('open', function (event) {
|
||||
console.log("Live-reloading websocket connected.");
|
||||
});
|
||||
ws.addEventListener('message', (event) => {
|
||||
console.log(event);
|
||||
if (event.data == 'reload'){
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
require("./util/polyfill.js");
|
||||
const misc = require("./util/misc.js");
|
||||
const views = require("./util/views.js");
|
||||
|
Reference in New Issue
Block a user