import { defineConfig } from 'vite'; import laravel from 'laravel-vite-plugin'; import tailwindcss from '@tailwindcss/vite'; export default defineConfig({ build: { // Target browsers that support ES modules natively (Chrome 89+, Firefox 89+, // Safari 15+, Edge 89+). Eliminates legacy polyfills flagged by PageSpeed. target: ['es2022', 'chrome89', 'firefox89', 'safari15', 'edge89'], }, plugins: [ laravel({ input: ['resources/css/app.css', 'resources/js/app.js'], refresh: true, }), tailwindcss(), ], server: { host: '0.0.0.0', port: 5173, strictPort: true, cors: true, hmr: { host: 'localhost', clientPort: process.env.VITE_PORT || 5173, }, watch: { ignored: ['**/storage/framework/views/**'], }, }, });