fix(dev): allow LAN hosts in allowedDevOrigins so the dev server hydrates on other devices
This commit is contained in:
parent
e0f305b026
commit
207de71153
1 changed files with 5 additions and 0 deletions
|
|
@ -5,6 +5,11 @@ import packageJson from "./package.json" with { type: "json" };
|
|||
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
// Next 16 blocks dev-mode resources (HMR, chunks, fonts) for any Host header
|
||||
// not listed here. Without this, loading the dev server from a LAN IP (e.g. a
|
||||
// phone on http://192.168.1.2:3000) serves HTML whose JS never hydrates, so
|
||||
// forms fall back to native GET submits (login "resets" with no request).
|
||||
allowedDevOrigins: ["192.168.1.2", "192.168.1.*"],
|
||||
// Your Next.js config here
|
||||
env: {
|
||||
version: packageJson.version,
|
||||
|
|
|
|||
Loading…
Reference in a new issue