Skip to content

node-hmr v0.2.0

Choose a tag to compare

@github-actions github-actions released this 08 Sep 23:07
· 2 commits to main since this release
02e2d36

Minor Changes

  • BREAKING CHANGE: Custom browser HMR update events now carry JSON data in a data record instead of top-level timestamp and updates fields (see #11706).

    Apps using the standard asset server and createBrowserHmrChannel() integration need no changes to their event handling. Give each tool a separate key in the record, for example { type: 'update', data: { 'my-tool@1': { version: 1 } } }. node-hmr forwards this data unchanged to browser clients in a { type: 'browser:update', data } event.

     channel.onFileEvents(async () => [
       {
         type: 'update',
    -    timestamp,
    -    updates,
    +    data: { 'my-tool@1': { timestamp, updates } },
       },
     ])