From 08ff619d47da0ddf491c48df1f654a9ec0f418b8 Mon Sep 17 00:00:00 2001 From: doodlewind <7312949+doodlewind@users.noreply.github.com> Date: Mon, 25 Nov 2024 06:58:14 +0000 Subject: [PATCH] chore(cli): enable accessing dev server by host name (#8912) This PR is particularly useful for debugging mobile app (and any other personal devices for testing) via [Tailscale](https://tailscale.com/), since it allows accessing a stable hostname on phone, instead of typing in an unstable IP address. Before: ![image](https://github.com/user-attachments/assets/6ca9edd5-11b1-449b-bf8d-0423cb8a53fe) After: ![image](https://github.com/user-attachments/assets/9df7710f-f662-4a3c-83c4-cf5f28d7c64f) --- tools/cli/src/webpack/config.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/cli/src/webpack/config.ts b/tools/cli/src/webpack/config.ts index 012d6b7caf..72c692dc25 100644 --- a/tools/cli/src/webpack/config.ts +++ b/tools/cli/src/webpack/config.ts @@ -347,6 +347,8 @@ export const createConfiguration: ( optimization: OptimizeOptionOptions(buildFlags), devServer: { + host: '0.0.0.0', + allowedHosts: 'all', hot: buildFlags.static ? false : 'only', liveReload: !buildFlags.static, client: {