-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.js
More file actions
28 lines (26 loc) · 677 Bytes
/
vite.config.js
File metadata and controls
28 lines (26 loc) · 677 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
28
import react from "@vitejs/plugin-react";
import { defineConfig, loadEnv } from "vite";
export default defineConfig(async ({ command, mode }) => {
const env = loadEnv(mode, process.cwd(), "");
console.log(env);
return {
base: env.VITE_APP_BASE_PATH, // Use the base path from environment variable
plugins: [react()],
define: {
"process.env": env,
},
optimizeDeps: {
exclude: ["@undecaf/barcode-detector-polyfill", "@undecaf/zbar-wasm"],
},
preview: {
port: 8080,
strictPort: true,
},
server: {
port: 8080,
strictPort: true,
host: true,
//origin: "http://0.0.0.0:8080",
},
};
});