You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ES modules are stored in cache, and thus a re-imported module (even dynamically imported) keeps its implementation even if the file itself has been updated. In order to work around this, add a counter or similar (random number?) as a hash parameter to force the module to reload.
Hash might be better, because it might cause the old cache entry to be evicted, but this is not certain. It might be hard to avoid a memory leak here before denoland/deno#8327 is released.
Using workers might solve the cache issue, but this is not certain. See denoland/deno#6116.
The text was updated successfully, but these errors were encountered:
Confirmed this is an issue also with workers. The Deno cache doesn't get reloaded.
The solution would be for the server command to run a watching builder in a separate process, and restart that process when layouts have been changed.
bob watch could be the name of the new command / action. This watches the content directory and builds on file modifications.
The server command itself would then watch the layout directory and restart the above command in case of changes.
Add new --no-initial-changes flag on the second run to disable getting file system changes, as everything should be up to date anyway, and getting the changes can be pretty heavy.
ES modules are stored in cache, and thus a re-imported module (even dynamically imported) keeps its implementation even if the file itself has been updated. In order to work around this, add a counter or similar (random number?) as a hash parameter to force the module to reload.
Hash might be better, because it might cause the old cache entry to be evicted, but this is not certain. It might be hard to avoid a memory leak here before denoland/deno#8327 is released.
Using workers might solve the cache issue, but this is not certain. See denoland/deno#6116.
The text was updated successfully, but these errors were encountered: