
Replit-Commit-Author: Agent Replit-Commit-Session-Id: e931b5ab-041b-42e7-baf1-50017869cef6 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/e19c6a51-7e4c-4bb8-a6a6-46dc00f0ec99/3a46e308-0211-4c54-a52b-c291792321ef.jpg
37 lines
1008 B
TypeScript
37 lines
1008 B
TypeScript
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import themePlugin from "@replit/vite-plugin-shadcn-theme-json";
|
|
import path, { dirname } from "path";
|
|
import runtimeErrorOverlay from "@replit/vite-plugin-runtime-error-modal";
|
|
import { fileURLToPath } from "url";
|
|
|
|
const __filename = fileURLToPath(import.meta.url);
|
|
const __dirname = dirname(__filename);
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
react(),
|
|
runtimeErrorOverlay(),
|
|
themePlugin(),
|
|
...(process.env.NODE_ENV !== "production" &&
|
|
process.env.REPL_ID !== undefined
|
|
? [
|
|
await import("@replit/vite-plugin-cartographer").then((m) =>
|
|
m.cartographer(),
|
|
),
|
|
]
|
|
: []),
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "client", "src"),
|
|
"@shared": path.resolve(__dirname, "shared"),
|
|
},
|
|
},
|
|
root: path.resolve(__dirname, "client"),
|
|
build: {
|
|
outDir: path.resolve(__dirname, "dist/public"),
|
|
emptyOutDir: true,
|
|
},
|
|
});
|