import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import tsconfigPaths from "vite-tsconfig-paths";
import env from "vite-plugin-env-compatible";
import sassDts from "vite-plugin-sass-dts";

export default defineConfig({
  server: {
    host: true,
    port: 3000,
    open: true,
  },
  build: {
    outDir: "build",
    sourcemap: true,
    minify: false,
  },
  plugins: [env(), tsconfigPaths(), react(), sassDts()],
  resolve: {
    alias: {
      os: "rollup-plugin-node-polyfills/polyfills/os",
    },
  },
});
