-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
27 lines (25 loc) · 842 Bytes
/
vite.config.ts
File metadata and controls
27 lines (25 loc) · 842 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import path from "path";
import { fileURLToPath } from "url";
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
export default defineConfig({
appType: "spa",
root: path.resolve(__dirname, "client"),
plugins: [react()],
resolve: {
alias: {
"@": path.resolve(__dirname, "client", "src"),
"@shared": path.resolve(__dirname, "shared"),
"@assets": path.resolve(__dirname, "attached_assets"),
},
},
publicDir: path.resolve(__dirname, "client", "public"),
build: {
outDir: path.resolve(__dirname, "dist/public"),
emptyOutDir: true,
// Do NOT set rollupOptions.input — let Vite auto-detect client/index.html
},
server: { fs: { strict: true, deny: ["**/.*"] } },
});