import react from "@vitejs/plugin-react";
import { resolve } from "path";
import { defineConfig } from "vite";

export const alias = {
  "@": resolve(__dirname, "./lib/"),
  "@ui_kit": resolve(__dirname, "./lib/ui_kit"),
  "@icons": resolve(__dirname, "./lib/assets/icons"),
  "@stores": resolve(__dirname, "./lib/stores"),
  "@api": resolve(__dirname, "./lib/api"),
  "@model": resolve(__dirname, "./lib/model"),
  "@utils": resolve(__dirname, "./lib/utils"),
  "@contexts": resolve(__dirname, "./lib/contexts"),
  "@locales": resolve(__dirname, "./lib/locales"),
};

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [react()],
  resolve: {
    alias,
  },
  define: {
    "process.env": process.env,
  },
});
