31 lines
660 B
TypeScript
31 lines
660 B
TypeScript
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import tailwindcss from "@tailwindcss/vite";
|
|
import path from "path";
|
|
import { fileURLToPath } from "url";
|
|
|
|
const projectRoot = fileURLToPath(new URL(".", import.meta.url));
|
|
|
|
export default defineConfig({
|
|
plugins: [react(), tailwindcss()],
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(projectRoot, "src"),
|
|
},
|
|
dedupe: ["react", "react-dom"],
|
|
},
|
|
root: projectRoot,
|
|
build: {
|
|
outDir: path.resolve(projectRoot, "dist"),
|
|
emptyOutDir: true,
|
|
},
|
|
server: {
|
|
port: 5173,
|
|
host: "0.0.0.0",
|
|
},
|
|
preview: {
|
|
port: 4173,
|
|
host: "0.0.0.0",
|
|
},
|
|
});
|