import tailwindcss from "@tailwindcss/vite";
import react from "@vitejs/plugin-react";
import path from "path";
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";

export default defineConfig({
  plugins: [react(), tailwindcss(), tsconfigPaths()],
  resolve: {
    alias: {
      "@": path.resolve(__dirname, "./src"),
    },
  },

  server: {
    host: true,
    port: 5173,
    allowedHosts: [
      "admin.simpletravel.uz",
      "merchant.simpletravel.uz",
    ],
  },

  preview: {
    host: true,
    port: 5263,
    allowedHosts: [
      "admin.simpletravel.uz",
      "merchant.simpletravel.uz",
    ],
  },

  build: {
    outDir: "dist",
    sourcemap: false,
  },

  base: "/",
});
