import { defineConfig } from 'vite';
import { resolve } from 'path';

export default defineConfig({
  build: {
    outDir: 'dist',
    emptyOutDir: false,
    rollupOptions: {
      input: {
        'gin-overrides-ui': resolve(__dirname, 'src/gin-overrides-ui.scss'),
        'gin-overrides-admin': resolve(__dirname, 'src/gin-overrides-admin.scss'),
      },
      output: {
        assetFileNames: '[name][extname]',
      },
    },
    cssMinify: true,
    minify: false,
  },
  css: {
    preprocessorOptions: {
      scss: {
        api: 'modern-compiler',
      },
    },
  },
});
