mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
feat: build ui (#3254)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
This commit is contained in:
parent
9558e4053d
commit
67ec3c15f8
|
|
@ -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,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"
|
||||
|
|
@ -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: {
|
||||
|
|
|
|||
Loading…
Reference in New Issue