import { defineConfig } from "vite";
import laravel from "laravel-vite-plugin";
import tailwindcss from "@tailwindcss/vite";

export default defineConfig({
    plugins: [
        laravel({
            input: [
                "resources/css/app.css",
                "resources/css/chat.css",
                "resources/js/admin-login.js",
                "resources/js/app.js",
                "resources/js/chat.js",
                "resources/js/effects.js",
                "resources/js/front.js",
                "resources/js/home-login.js",
                "resources/js/password-forgot.js",
            ],
            refresh: true,
        }),
        tailwindcss(),
    ],
    build: {
        rollupOptions: {
            output: {
                manualChunks(id) {
                    if (id.includes("node_modules")) {
                        return "vendor";
                    }
                },
            },
        },
        sourcemap: false,
    },
    server: {
        watch: {
            ignored: ["**/storage/framework/views/**"],
        },
    },
});
