import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
import { bunny } from 'laravel-vite-plugin/fonts';
import tailwindcss from '@tailwindcss/vite';

export default defineConfig({
    plugins: [
        laravel({
            input: ['resources/css/app.css', 'resources/js/app.js',
                'resources/js/submissions.js', 'resources/js/news-submissions.js',
                'resources/js/RomPatcher.js', 'resources/js/PlayOnlineAndPatcher.js',
                'resources/js/PlayOnline.js', 'resources/js/HashesChecker.js',
            ],
            refresh: true,
            fonts: [
                bunny('Instrument Sans', {
                    weights: [400, 500, 600],
                }),
            ],
        }),
    ],
    server: {
        host: 'rhpz.local',
        port: 5173,
        watch: {
            ignored: ['**/storage/framework/views/**'],
        },
        https: {
            cert: '/mnt/ssd-data/sites/romhackplaza/rhpz.local+1.pem',
            key:  '/mnt/ssd-data/sites/romhackplaza/rhpz.local+1-key.pem',
        },
    },
});
