export let changing = 2; const thisURL = new URL(import.meta.url) const thisFile = thisURL.pathname; if(!thisURL.search) { setInterval(()=>{ import(thisFile+"?"+Math.random()).then(module=>{ changing = module.changing; console.log(changing); }) }, 3000); }