Merge branch 'dev' of github.com:tbphp/gpt-load into dev
This commit is contained in:
@@ -29,7 +29,6 @@ const handleLogin = async () => {
|
||||
<template>
|
||||
<div class="login-container">
|
||||
<n-card class="login-card" title="登录">
|
||||
<div>auth: {{ authKey }}</div>
|
||||
<n-space vertical>
|
||||
<n-input
|
||||
v-model:value="authKey"
|
||||
|
@@ -1,30 +1,35 @@
|
||||
import vue from "@vitejs/plugin-vue";
|
||||
import path from "path";
|
||||
import { defineConfig } from "vite";
|
||||
import { defineConfig, loadEnv } from "vite";
|
||||
|
||||
// https://vite.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [vue()],
|
||||
// 解析配置
|
||||
resolve: {
|
||||
// 配置路径别名
|
||||
alias: {
|
||||
"@": path.resolve(__dirname, "./src"),
|
||||
},
|
||||
},
|
||||
// 开发服务器配置
|
||||
server: {
|
||||
// 代理配置示例
|
||||
proxy: {
|
||||
"/api": {
|
||||
target: "http://localhost:3000",
|
||||
changeOrigin: true,
|
||||
export default defineConfig(({ mode }) => {
|
||||
// 加载环境变量
|
||||
const env = loadEnv(mode, path.resolve(__dirname, "../"), "");
|
||||
|
||||
return {
|
||||
plugins: [vue()],
|
||||
// 解析配置
|
||||
resolve: {
|
||||
// 配置路径别名
|
||||
alias: {
|
||||
"@": path.resolve(__dirname, "./src"),
|
||||
},
|
||||
},
|
||||
},
|
||||
// 构建配置
|
||||
build: {
|
||||
outDir: "../cmd/gpt-load/dist",
|
||||
assetsDir: "assets",
|
||||
},
|
||||
// 开发服务器配置
|
||||
server: {
|
||||
// 代理配置示例
|
||||
proxy: {
|
||||
"/api": {
|
||||
target: env.VITE_API_BASE_URL,
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
// 构建配置
|
||||
build: {
|
||||
outDir: "../cmd/gpt-load/dist",
|
||||
assetsDir: "assets",
|
||||
},
|
||||
};
|
||||
});
|
||||
|
Reference in New Issue
Block a user