-
Notifications
You must be signed in to change notification settings - Fork 1
/
vite.config.ts.timestamp-1677295373284.mjs
78 lines (78 loc) · 6.27 KB
/
vite.config.ts.timestamp-1677295373284.mjs
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
// vite.config.ts
import { defineConfig, loadEnv } from "vite";
import react from "@vitejs/plugin-react";
import tsconfigPaths from "vite-tsconfig-paths";
import mkcert from "vite-plugin-mkcert";
import path from "path";
var vite_config_default = defineConfig(({ mode }) => {
const serverOptions = {
proxy: {
"/api": {
target: process.env.VITE_PUBLIC_API_SERVER,
changeOrigin: true,
rewrite: (path2) => path2.replace(/^\/api/, "")
}
}
};
const buildOptions = {
outDir: "dist",
assetsDir: "assets",
commonjsOptions: {
include: []
}
};
if (mode === "production") {
process.env = {
...process.env,
...loadEnv(mode, process.cwd())
};
Object.assign(serverOptions, {
host: "0.0.0.0",
port: 3e3
});
Object.assign(buildOptions, {
sourcemap: false,
manifest: true
});
}
if (mode === "development") {
Object.assign(serverOptions, {
host: "localhost",
port: 3e3
});
Object.assign(buildOptions, {
sourcemap: true
});
}
return {
plugins: [
tsconfigPaths(),
react({
jsxImportSource: "@emotion/react",
babel: {
plugins: ["@emotion/babel-plugin"]
}
}),
mkcert()
],
optimizeDeps: {
disabled: false
},
base: "/",
publicDir: "./public",
server: serverOptions,
build: buildOptions,
preview: {
port: 3e3
},
resolve: {
alias: {
react: path.resolve("./node_modules/react")
}
}
};
});
export {
vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJu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