import path from "path"
import tailwindcss from "@tailwindcss/vite"
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import { defineEnv } from './vite.env';

// https://vitejs.dev/config
export default defineConfig({
  root: path.resolve(__dirname, './src/autoplay_window'),
  plugins: [react(), tailwindcss()],
  resolve: {
    alias: {
      "@": path.resolve(__dirname, "./src"),
    },
  },
  build: {
    outDir: path.resolve(__dirname, '.vite/renderer/autoplay_window'),
  },
  server: {
    fs: {
      allow: [path.resolve(__dirname)],
    },
  },
  define: defineEnv,
});
