import tailwindcss from "@tailwindcss/vite";
import vue from "@vitejs/plugin-vue";
import { defineConfig } from "vite";

const root = new URL(".", import.meta.url).pathname;

export default defineConfig({
  plugins: [tailwindcss(), vue()],
  root,
  server: {
    host: true,
    port: 5174,
    allowedHosts: ["sobina.local"],
    proxy: {
      "/api": "http://127.0.0.1:5080",
    },
  },
  build: {
    outDir: "../../dist/viewer",
    emptyOutDir: true,
  },
})
