import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import { viteSingleFile } from 'vite-plugin-singlefile';

export default defineConfig({
  plugins: [react(), viteSingleFile()],
  root: __dirname,
  build: {
    outDir: '../../dist/app-ui',
    emptyOutDir: false,
    rollupOptions: {
      output: {
        entryFileNames: 'dashboard.js',
        assetFileNames: 'dashboard.[ext]',
      },
    },
  },
  resolve: {
    alias: {
      '@': '../..',
    },
  },
});
