fix: expose Vite dev server to local browser

This commit is contained in:
2026-08-04 15:51:28 +01:00
parent c96264ae96
commit caf2537a98
4 changed files with 29 additions and 0 deletions

View File

@@ -7,6 +7,22 @@ import { bunny } from 'laravel-vite-plugin/fonts';
import { defineConfig } from 'vite';
export default defineConfig({
server: {
host: '0.0.0.0',
port: 5173,
strictPort: true,
origin: 'http://localhost:5173',
cors: {
origin: [
'http://localhost:8000',
'http://127.0.0.1:8000',
],
},
hmr: {
host: 'localhost',
port: 5173,
},
},
plugins: [
laravel({
input: ['resources/css/app.css', 'resources/js/app.tsx'],