1 import { defineConfig } from "vite";
2 import react from "@vitejs/plugin-react";
3 import path from "path";
4 import runtimeErrorOverlay from "@replit/vite-plugin-runtime-error-modal";
5
6 export default defineConfig({
7 base: "./",
8 plugins: [
9 react(),
10 runtimeErrorOverlay(),
11 ...(process.env.NODE_ENV !== "production" &&
12 process.env.REPL_ID !== undefined
13 ? [
14 await import("@replit/vite-plugin-cartographer").then((m) =>
15 m.cartographer(),
16 ),
17 ]
18 : []),
19 ],
20 resolve: {
21 alias: {
22 "@": path.resolve(import.meta.dirname, "client", "src"),
23 "@shared": path.resolve(import.meta.dirname, "shared"),
24 "@assets": path.resolve(import.meta.dirname, "attached_assets"),
25 },
26 },
27 root: path.resolve(import.meta.dirname, "client"),
28 build: {
29 outDir: path.resolve(import.meta.dirname, "dist/public"),
30 emptyOutDir: true,
31 },
32 server: {
33 fs: {
34 strict: true,
35 deny: ["**/.*"],
36 },
37 },
38 });