From 8e0cda290d85d0a126093c9950c8030cfcb9d800 Mon Sep 17 00:00:00 2001 From: pacien Date: Sat, 19 Nov 2022 18:54:02 +0100 Subject: viewer/build: use poll-based live reload in sandbox Continuing to use a watch-based approach by default elsewhere. --- flake.nix | 4 ++++ viewer/.env.development | 1 + viewer/vue.config.js | 1 + 3 files changed, 6 insertions(+) diff --git a/flake.nix b/flake.nix index 8a5fb99..6b7110a 100644 --- a/flake.nix +++ b/flake.nix @@ -164,6 +164,10 @@ restrictNetwork = false; patchQemu9p = true; tools = devTools; + envVars = { + # File modification watch doesn't work through the VM for live reload. + VUE_APP_WEBPACK_WATCH_POLL = "1000"; + }; config = { # The viewer's build and devel server are resource-hungry. virtualisation.cores = 2; diff --git a/viewer/.env.development b/viewer/.env.development index 0d87cf4..7e9a240 100644 --- a/viewer/.env.development +++ b/viewer/.env.development @@ -1,3 +1,4 @@ VUE_APP_DEVSERVER_PORT=8085 VUE_APP_DEVSERVER_CONFIG_PATH=../example/ VUE_APP_DATA_URL=~/ +VUE_APP_WEBPACK_WATCH_POLL=0 diff --git a/viewer/vue.config.js b/viewer/vue.config.js index ef6d262..ffaaeee 100644 --- a/viewer/vue.config.js +++ b/viewer/vue.config.js @@ -41,6 +41,7 @@ module.exports = defineConfig({ }, watchOptions: { ignored: /node_modules/, + poll: parseInt(process.env.VUE_APP_WEBPACK_WATCH_POLL ?? 0), }, }, -- cgit v1.2.3