import { defineConfig } from "vite";
import { svelte } from "@sveltejs/vite-plugin-svelte";
import { viteStaticCopy } from "vite-plugin-static-copy";
import * as path from "path";

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    svelte(),
    viteStaticCopy({
      targets: [
        {
          src: path.join(__dirname, "node_modules/boxicons", "fonts"),
          dest: path.resolve(__dirname, "dist/vendor/boxicons"),
        },
        {
          src: path.join(__dirname, "node_modules/boxicons", "css"),
          dest: path.resolve(__dirname, "dist/vendor/boxicons"),
        },
      ],
    }),
  ],
  base: "./",
});
