Closed matt-way closed 1 year ago
Wasn't it already reloading the component if the dependency module has changed? if it's not then it's most likely an issue.
However, can you try the granular pragma?
It ended up being my transpiler not updating the import paths so that they reload instead of cached versions.
If I had a file with constants for example:
And a component:
Unless I'm mistaken, it seems like there is no way to setup hmr so that if the constants file was changed, the component would update. As per the esm-hmr spec (https://github.com/FredKSchott/esm-hmr#acceptdeps-string-handler-deps-any-module-any--void), dependencies can be passed to the
accept
function (where a deps tree can be managed to make the above work). Is this something a PR would be welcome for, or is it already possible and I'm just missing something?