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
{{ message }}
Repository navigation
runtime output for the 'esm' bundler does not refresh #65
Quick recap. Refresh was not triggering for us. We use a custom esbuild-based bundler, our ESM implementation was originally based on the 'esm' spec published by snowpack here:
In particular, we were implementing the behavior of import.meta.hot.data as described in this document, where it is reset before the module is imported and any refresh callbacks are called.
This matters for this line in particular, where the registry is stored in the hot.data object. for esm-compliant bundlers this means the registry it blown away every update.
Since the snowpack and this spec itself is EOL I don't necessarily think that solid-refresh needs to change to support it. 'esm-hmr' support could instead be completely dropped or deprecated. We updated our HMR implementation to match vite's instead internally.
Honestly I'm a bit neutral. The only reason I still continued implementing this despite knowing Snowpack has been dead for almost 2 years, is that there are other bundlers that follows the spec (I forgot which) and so this whole "esm" thing is just a fallback if ever a bundler happens to be providing this support, the same way I have "standard" for bundlers like Parcel
Activity
lxsmnsyc commentedon Apr 10, 2024
Honestly I'm a bit neutral. The only reason I still continued implementing this despite knowing Snowpack has been dead for almost 2 years, is that there are other bundlers that follows the spec (I forgot which) and so this whole "esm" thing is just a fallback if ever a bundler happens to be providing this support, the same way I have "standard" for bundlers like Parcel