import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { viteStaticCopy } from "vite-plugin-static-copy";

// https://vite.dev/config/
export default defineConfig({
  plugins: [
    react(),
    viteStaticCopy({
      targets: [
        {
          src: "src/styles/codicon.ttf",
          dest: "assets",
        },
      ],
    }),
  ],
  build: {
    outDir: "build",
    // outDir: "/home/mohammed/.vscode-oss/extensions/codeflash.codeflash-0.0.2/packages/sidebar-webview/build",
    rollupOptions: {
      output: {
        entryFileNames: `assets/[name].js`,
        chunkFileNames: `assets/[name].js`,
        assetFileNames: `assets/[name].[ext]`,
      },
    },
  },
});
