-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
59 lines (55 loc) · 1.49 KB
/
vite.config.ts
File metadata and controls
59 lines (55 loc) · 1.49 KB
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// BERAT BİLAL CANKIR
// BERAT CANKIR
// CANKIR
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import path from "path";
import { fileURLToPath } from "url";
function getCurrentDir() {
try {
return __dirname;
} catch {
return path.dirname(fileURLToPath(import.meta.url));
}
}
const currentDir = getCurrentDir();
export default defineConfig({
plugins: [
react()
],
resolve: {
alias: {
"@": path.resolve(currentDir, "client", "src"),
"@bilesenler": path.resolve(currentDir, "client", "src", "bilesenler"),
"@arayuz": path.resolve(currentDir, "client", "src", "bilesenler", "arayuz"),
"@sayfalar": path.resolve(currentDir, "client", "src", "sayfalar"),
"@hooks": path.resolve(currentDir, "client", "src", "hooks"),
"@kutuphane": path.resolve(currentDir, "client", "src", "kutuphane"),
"@stiller": path.resolve(currentDir, "client", "src", "stiller"),
"@shared": path.resolve(currentDir, "shared"),
"@assets": path.resolve(currentDir, "attached_assets"),
},
},
root: path.resolve(currentDir, "client"),
publicDir: path.resolve(currentDir, "client", "public"),
build: {
outDir: path.resolve(currentDir, "dist/public"),
emptyOutDir: true,
},
logLevel: 'error',
server: {
host: "0.0.0.0",
port: 5000,
hmr: {
port: 5000,
},
allowedHosts: true,
fs: {
strict: true,
deny: ["**/.*"],
},
},
});
// BERAT BİLAL CANKIR
// BERAT CANKIR
// CANKIR