From ac4cc2044ec96dc541ed84a721286f2d3d49c009 Mon Sep 17 00:00:00 2001 From: ybouane Date: Fri, 11 Oct 2024 11:20:27 -0400 Subject: [PATCH] Bug correction: use query string to force import new config dynamically. --- watcher.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/watcher.js b/watcher.js index b772018..00a858e 100644 --- a/watcher.js +++ b/watcher.js @@ -4,7 +4,7 @@ let config = (await import('./config.js')).default; watchFile('./config.js', async ()=>{ // Dynamically reload config and watch it for changes. try { - config = (await import('./config.js')).default; + config = (await import('./config.js?refresh='+Date.now())).default; console.log('Reloaded config file.') } catch(e) { console.error(e);