import { defineConfig } from "vite"; import laravel from "laravel-vite-plugin"; import tailwindcss from "@tailwindcss/vite"; import { boboko } from "@boboko/core/vite-plugin"; 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: [ // checkout.css first: it's the portable cart/checkout module's // structural base (@layer bbk-checkout) and must load before // app.css so the host's own .bbk-* theming always wins. // Sourced from the @boboko/core npm package (a local // `file:../boboko-core` dependency — see package.json and // boboko()'s own comments in @boboko/core/vite-plugin for why // this needs no further config here). "node_modules/@boboko/core/resources/css/checkout.css", "resources/css/app.css", "resources/js/app.js", ], refresh: true, }), tailwindcss(), boboko(), ], server: { host: "0.0.0.0", port: process.env.VITE_PORT || 5174, strictPort: true, cors: true, hmr: { host: "localhost", clientPort: process.env.VITE_PORT || 5174, }, watch: { ignored: ["**/storage/framework/views/**"], }, }, });