import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react-swc';
import path from 'path';

export default defineConfig({
  base: '/wp-content/themes/cascapedia-st-jules/assets/dist/',
  plugins: [react()],
  resolve: {
    alias: {
      '@': path.resolve(__dirname, './assets/src'),
    },
  },
  build: {
    manifest: true,
    sourcemap: true,
    outDir: 'assets/dist',
    emptyOutDir: true,
    rollupOptions: {
      input: 'assets/src/main.tsx',
    },
  },
});
