First commit
This commit is contained in:
Executable
+29
@@ -0,0 +1,29 @@
|
||||
import { defineConfig, loadEnv } from "vite";
|
||||
import vue from "@vitejs/plugin-vue";
|
||||
import path from "path";
|
||||
|
||||
export default defineConfig(({ mode }) => {
|
||||
const env = loadEnv(mode, process.cwd(), "")
|
||||
const apiPort = Number(env.VITE_API_PORT) || 3300
|
||||
|
||||
return {
|
||||
plugins: [vue()],
|
||||
server: {
|
||||
hmr: {
|
||||
clientPort: 5173,
|
||||
protocol: "ws",
|
||||
},
|
||||
proxy: {
|
||||
"/api": {
|
||||
target: `http://localhost:${apiPort}`,
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
"@": path.resolve(__dirname, "src"),
|
||||
},
|
||||
},
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user