]> acesimba.cloud Git - study-mountion.git/commitdiff
vite dev server 绑 0.0.0.0:2341,支持公网直接访问
authorstudyhill <studyhill@local>
Thu, 18 Jun 2026 14:01:13 +0000 (22:01 +0800)
committerstudyhill <studyhill@local>
Thu, 18 Jun 2026 14:01:13 +0000 (22:01 +0800)
frontend/vite.config.js

index 3318422fd5b74878fdcaf7c818235f907cdce4ec..449ba5166314f96d5bb1d7ccedebc585ba5f6a8e 100644 (file)
@@ -5,6 +5,7 @@ import react from '@vitejs/plugin-react'
 export default defineConfig({
   plugins: [react()],
   server: {
+    host: true, // 绑 0.0.0.0,允许公网访问
     port: 2341,
     strictPort: true,
     proxy: {