import { vite as vidstack } from 'vidstack/plugins';
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
import { viteStaticCopy } from 'vite-plugin-static-copy';

export default defineConfig({
    plugins: [
        vidstack(),
        laravel({
            input: [
                'resources/css/app.css',
                'resources/js/app.js',
                'resources/js/modals-playlist.js',
                'resources/js/theme.js',
                'resources/js/player-mobile.js',
                'resources/js/player-data.js',
                'resources/js/player.js',
                'resources/js/playlist.js',
                'resources/js/upload.js',
                'resources/js/user-blacklist.js',
                'resources/js/admin-edit.js',
                'resources/js/admin-subtitles.js',
                'resources/js/preview.js'
            ],
            refresh: true,
        }),
        viteStaticCopy({
            targets: [
                {
                    src: 'node_modules/@jellyfin/libass-wasm/dist/js/*',
                    dest: 'js'
                },
            ]
        })
    ],
});
