Use Tailscale host for HotView HMR
This commit is contained in:
+2
-2
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
- No unreleased changes.
|
- Changed the HotView HMR host from loopback-only `127.0.0.1` to the detected Tailscale IPv4 address, with a `VITE_HMR_HOST` override for other private intranet addresses.
|
||||||
|
|
||||||
## 0.1.34 - 2026-07-15
|
## 0.1.34 - 2026-07-15
|
||||||
|
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
- Made map and audio Bible resources optional, collapsible, session-aware, and skipped when disabled.
|
- Made map and audio Bible resources optional, collapsible, session-aware, and skipped when disabled.
|
||||||
- Added current-session and new-session switches for contextual maps and KJV audio Bible.
|
- Added current-session and new-session switches for contextual maps and KJV audio Bible.
|
||||||
- Surfaced Strong's pronunciation metadata in the definition panel when the lexicon package provides it.
|
- Surfaced Strong's pronunciation metadata in the definition panel when the lexicon package provides it.
|
||||||
- Pinned the Vite HMR websocket host to `127.0.0.1` so the active HotView tab can receive updates when opened on that address.
|
- Configured the Vite HMR websocket for the active HotView tab.
|
||||||
- Documented the current resource behavior and the remaining blocker for licensed pronunciation audio packages.
|
- Documented the current resource behavior and the remaining blocker for licensed pronunciation audio packages.
|
||||||
|
|
||||||
## 0.1.33 - 2026-07-15
|
## 0.1.33 - 2026-07-15
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ Maps and audio are first-class session resources now. Existing and new sessions
|
|||||||
|
|
||||||
Disabled maps and audio do not load their package data in the background. The map and audio cards also persist collapsed state through the shared study settings snapshot.
|
Disabled maps and audio do not load their package data in the background. The map and audio cards also persist collapsed state through the shared study settings snapshot.
|
||||||
|
|
||||||
HotView is expected to run on `127.0.0.1:5174` in the active local loop. Vite's HMR websocket is pinned to that host so live updates keep flowing when the browser tab uses the same address.
|
HotView is expected to run on port `5174` in the active local loop. Open it from connected machines at `http://desktop:5174/`. Vite's HMR websocket defaults to the machine's Tailscale IPv4 address when available, which avoids ambiguous local hostname records while keeping the dev loop on the private Tailnet/local intranet. This is a private development path, not a public internet deployment. If a device needs a different reachable address, start HotView with `VITE_HMR_HOST` set to that address.
|
||||||
|
|
||||||
## Pronunciation Boundary
|
## Pronunciation Boundary
|
||||||
|
|
||||||
|
|||||||
+9
-1
@@ -1,5 +1,13 @@
|
|||||||
import { defineConfig } from 'vite'
|
import { defineConfig } from 'vite'
|
||||||
import react from '@vitejs/plugin-react'
|
import react from '@vitejs/plugin-react'
|
||||||
|
import { networkInterfaces } from 'node:os'
|
||||||
|
|
||||||
|
function tailscaleHost() {
|
||||||
|
const addresses = networkInterfaces().Tailscale ?? []
|
||||||
|
return addresses.find((address) => address.family === 'IPv4' && !address.internal)?.address
|
||||||
|
}
|
||||||
|
|
||||||
|
const hmrHost = process.env.VITE_HMR_HOST?.trim() || tailscaleHost() || 'desktop'
|
||||||
|
|
||||||
// https://vite.dev/config/
|
// https://vite.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
@@ -7,7 +15,7 @@ export default defineConfig({
|
|||||||
server: {
|
server: {
|
||||||
allowedHosts: ['desktop'],
|
allowedHosts: ['desktop'],
|
||||||
hmr: {
|
hmr: {
|
||||||
host: '127.0.0.1',
|
host: hmrHost,
|
||||||
protocol: 'ws',
|
protocol: 'ws',
|
||||||
},
|
},
|
||||||
fs: {
|
fs: {
|
||||||
|
|||||||
Reference in New Issue
Block a user