Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: honojs/vite-plugins
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: @hono/vite-dev-server@0.18.2
Choose a base ref
...
head repository: honojs/vite-plugins
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: @hono/vite-dev-server@0.18.3
Choose a head ref
  • 2 commits
  • 3 files changed
  • 3 contributors

Commits on Feb 28, 2025

  1. fix(dev-server): enable HMR for client-side (#233)

    * fix(dev-server): enable HMR for client-side
    
    * changeset
    yusukebe authored Feb 28, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    szokeasaurusrex Daniel Szoke
    Copy the full SHA
    1dbcbb8 View commit details
  2. Version Packages (#234)

    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    github-actions[bot] and github-actions[bot] authored Feb 28, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    szokeasaurusrex Daniel Szoke
    Copy the full SHA
    abb8f2c View commit details
Showing with 15 additions and 4 deletions.
  1. +6 −0 packages/dev-server/CHANGELOG.md
  2. +1 −1 packages/dev-server/package.json
  3. +8 −3 packages/dev-server/src/dev-server.ts
6 changes: 6 additions & 0 deletions packages/dev-server/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @hono/vite-dev-server

## 0.18.3

### Patch Changes

- [#233](https://github.com/honojs/vite-plugins/pull/233) [`1dbcbb8654739f54beb0e4082b3639f4f4a9468f`](https://github.com/honojs/vite-plugins/commit/1dbcbb8654739f54beb0e4082b3639f4f4a9468f) Thanks [@yusukebe](https://github.com/yusukebe)! - fix: enable HMR for client-side

## 0.18.2

### Patch Changes
2 changes: 1 addition & 1 deletion packages/dev-server/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@hono/vite-dev-server",
"description": "Vite dev-server plugin for Hono",
"version": "0.18.2",
"version": "0.18.3",
"types": "dist/index.d.ts",
"module": "dist/index.js",
"type": "module",
11 changes: 8 additions & 3 deletions packages/dev-server/src/dev-server.ts
Original file line number Diff line number Diff line change
@@ -208,9 +208,14 @@ export function devServer(options?: DevServerOptions): VitePlugin {
}
})
},
handleHotUpdate({ server }) {
server.ws.send({ type: 'full-reload' })
return []
handleHotUpdate({ server, modules }) {
// Force reload the page if any of the modules is SSR
const isSSR = modules.some((mod) => mod._ssrModule)
if (isSSR) {
server.hot.send({ type: 'full-reload' })
return []
}
// Apply HMR for the client-side modules
},
config: () => {
return {