import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import ui from '@nuxt/ui/vite'

export default defineConfig({
    plugins: [vue(), ui()],
    build: {
        // Use the Vue entry file at src/vue/main.js
        rollupOptions: {
            input: { main: 'src/vue/main.js' },
            output: {
                entryFileNames: '[name].js' ,
                assetFileNames: (assetInfo) => {return 'assets/[name][extname]'},
            },
        },
        // Output compiled assets into dist/vue
        outDir: 'dist/vue',
        emptyOutDir: true,
        sourcemap: true,
    },
})