Open kitsonk opened 3 years ago
@kitsonk did you ever come across a solution for readTextFile
invalidation?
So any news on this)
Deno team consistently closes every new task opened and links to this And no action on this for 4 years
If you check above at least 10issues closed in favor to this and nothing is happening
cc @lucacasonato just pointing to a big problem, especially, a bug closed with no reason https://github.com/denoland/deno/issues/25742
With ES Modules, it is effectively impossible to do "hot module reloading" of the modules, as ES Module specification is fairly strict that once the module is resolve and its two pass instantiation is done, that is the end of the road for the module and cannot be replaced.
When you are mocking/testing/etc. though, it is potentially valuable to make changes to a module and "reload" it via dynamic import. In Node.js, they have solved this problem with an experimental loader API. For an example of how this gets integrated to provide a mechanism for module replacements of imports that are still modules, quibble provides ESM support. It basically creates a unique specifier for every time the module is requested to get around the challenge of ES modules being static once resolved.
This would also support solving things like #1739, which we have long wanted to do.