-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvite.config.ts
More file actions
48 lines (47 loc) · 1.3 KB
/
vite.config.ts
File metadata and controls
48 lines (47 loc) · 1.3 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
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import path from "path";
import { createHtmlPlugin } from "vite-plugin-html";
import tailwindcss from "@tailwindcss/vite";
export default defineConfig({
plugins: [
react(),
tailwindcss(),
createHtmlPlugin({
entry: "src/main.tsx",
template: "index.html",
inject: {
data: {
title: "index",
injectScript: `<script src="./inject.js"></script>`,
},
},
}),
],
resolve: {
alias: {
"@": path.resolve(__dirname, "src"),
"@components": path.resolve(__dirname, "src/components"),
"@utils": path.resolve(__dirname, "src/utils"),
"@services": path.resolve(__dirname, "src/services"),
"@lib": path.resolve(__dirname, "src/lib"),
"@features": path.resolve(__dirname, "src/features"),
"@config": path.resolve(__dirname, "src/config"),
"@assets": path.resolve(__dirname, "src/assets"),
"@dscn": path.resolve(__dirname, "src/design-system/cn"),
},
},
define: {
"process.env": JSON.stringify(process.env),
},
server: {
host: "0.0.0.0",
port: parseInt(process.env.HOST_PORT || "3000"),
proxy: {
"/api": {
target: process.env.API_BASE_URL,
changeOrigin: true,
},
},
},
});