import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
import vue from '@vitejs/plugin-vue';
import path from 'path';
import vuetify from "vite-plugin-vuetify";

export default defineConfig({
    plugins: [
        laravel({
            input: 'resources/js/app.ts',  // ← rename app.ts to app.ts
            refresh: true,
        }),
        vue({
            template: {
                transformAssetUrls: {
                    base: null,
                    includeAbsolute: false,
                },
            },
        }),
        vuetify({autoImport: true})
    ],
    resolve: {
        alias: {
            '@': path.resolve(__dirname, 'resources/js'),  // ← mirrors tsconfig paths
        },
    },
});
