Bug correction: use query string to force import new config dynamically.

This commit is contained in:
ybouane 2024-10-11 11:20:27 -04:00
parent 03baf4dd4d
commit ac4cc2044e

View file

@ -4,7 +4,7 @@ let config = (await import('./config.js')).default;
watchFile('./config.js', async ()=>{ // Dynamically reload config and watch it for changes. watchFile('./config.js', async ()=>{ // Dynamically reload config and watch it for changes.
try { try {
config = (await import('./config.js')).default; config = (await import('./config.js?refresh='+Date.now())).default;
console.log('Reloaded config file.') console.log('Reloaded config file.')
} catch(e) { } catch(e) {
console.error(e); console.error(e);