next.js
2c487e1c - refactor: Consistently call HMR messages `message` (#83341)

Commit
120 days ago
refactor: Consistently call HMR messages `message` (#83341) The HMR messages we send through the WebSocket to the browser were inconsistently called `message`, `msg`, `obj`, `payload`, or `action`. With this PR, we're streamlining the naming to consistently use `message` throughout the codebase. In addition, the discriminating property `action` is renamed to `type`, aligning it with Turbopack's own HMR messages. As an alternative, I considered naming them `action` instead, but this did not yield the desired consistency across the codebase. Ultimately, I decided to stick with `message` to avoid confusion and maintain alignment with Turbopack's terminology (see `@vercel/turbopack-ecmascript-runtime/browser/dev/hmr-client/hmr-client`).
Author
Parents
Loading