import angular from "@analogjs/vite-plugin-angular";
{% if use_tailwind %}import tailwindcss from "@tailwindcss/vite";
{% endif %}import litestar from "litestar-vite-plugin";
import { defineConfig } from "vite";

export default defineConfig({
  resolve: {
    mainFields: ["module"],
    alias: {
      "@": "/{{ resource_dir }}",
    },
  },
  plugins: [
    // Angular plugin must be first
    angular(),
{% if use_tailwind %}    tailwindcss(),
{% endif %}    litestar({
      input: ["{{ resource_dir }}/main.ts"{% if use_tailwind %}, "{{ resource_dir }}/styles.css"{% endif %}],
    }),
  ],
});
