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

export default defineConfig({
    plugins: [
        laravel({
            input: ['resources/css/app.css', 'resources/js/app.js'],
            refresh: true,
        }),
        tailwindcss(),
    ],
    server: {
        cors: true,
        host: "homelab-sso.test",
        // https: {
        //     key: fs.readFileSync(path.resolve(
        //         process.env.HOME, '.valet/Certificates/homelab-sso.test.key'
        //     )),
        //     cert: fs.readFileSync(path.resolve(
        //         process.env.HOME, '.valet/Certificates/homelab-sso.test.crt'
        //     )),
        // },
    },
});