feat: build ui (#3254)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run

This commit is contained in:
shaohuzhang1 2025-06-13 16:48:55 +08:00 committed by GitHub
parent 9558e4053d
commit 67ec3c15f8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 4 additions and 5 deletions

2
ui/env/.env vendored
View File

@ -2,4 +2,4 @@ VITE_APP_NAME=ui
VITE_BASE_PATH=/ui/
VITE_APP_PORT=3000
VITE_APP_TITLE = 'MaxKB'
VITE_INPUT="index.html"
VITE_ENTRY="entry/system/index.html"

2
ui/env/.env.chat vendored
View File

@ -2,4 +2,4 @@ VITE_APP_NAME=chat
VITE_BASE_PATH=/chat/
VITE_APP_PORT=3000
VITE_APP_TITLE = 'MaxKB'
VITE_INPUT="chat.html"
VITE_ENTRY="entry/chat/index.html"

View File

@ -12,7 +12,6 @@ const envDir = './env'
// https://vite.dev/config/
export default defineConfig(({ mode }) => {
console.log('ssss')
const ENV = loadEnv(mode, envDir)
const prefix = process.env.VITE_DYNAMIC_PREFIX || ENV.VITE_BASE_PATH
const proxyConf: Record<string, string | ProxyOptions> = {}
@ -41,7 +40,7 @@ export default defineConfig(({ mode }) => {
lintOnSave: false,
base: prefix,
envDir: envDir,
plugins: [vue(), vueJsx(), DefineOptions(), createHtmlPlugin({ template: ENV.VITE_INPUT })],
plugins: [vue(), vueJsx(), DefineOptions(), createHtmlPlugin({ template: ENV.VITE_ENTRY })],
server: {
cors: true,
host: '0.0.0.0',
@ -52,7 +51,7 @@ export default defineConfig(({ mode }) => {
build: {
outDir: `dist${ENV.VITE_BASE_PATH}`,
rollupOptions: {
input: path.resolve(__dirname, ENV.VITE_INPUT),
input: path.resolve(__dirname, ENV.VITE_ENTRY),
},
},
resolve: {