Sembiance
Sembiance
DDeno
Created by Sembiance on 9/27/2023 in #help
Force await import() to import a fresh copy?
I have a Deno instance that dynamically loads a module with: await import("some/module.js") The module changes on disk and now I want the running deno instance to import it again getting the fresh changes. I was accomplishing this by adding a random number like await import("some/module.js?v=" + Date.now().toString()) which deno then views as a new file and happily loads it. Problem is, over time, this caused my deno dep_analysis_cache files on disk to become HUGE (1GB+). Is there a magic way I can force deno when I call import() to always import a fresh copy? Or some whay to clear the already loaded cached content? Or should I just stay on top of the dep_analysis_Cache bloat and delete them when they get big?
8 replies