Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Pangea-Agent
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Gavin-Group
Pangea-Agent
Commits
1582b695
Commit
1582b695
authored
Dec 25, 2025
by
高如斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
拆包
parent
0db615a6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
11 deletions
+28
-11
vite.config.ts
frontend/vite.config.ts
+28
-11
No files found.
frontend/vite.config.ts
View file @
1582b695
/*
* @Description:
* @Author: gaorubin
* @Date: 2025-12-22 14:30:43
* @LastEditors: gaorubin
* @LastEditTime: 2025-12-24 18:11:39
*/
import
{
defineConfig
}
from
"vite"
;
import
{
defineConfig
}
from
"vite"
;
import
vue
from
"@vitejs/plugin-vue"
;
import
vue
from
"@vitejs/plugin-vue"
;
import
path
from
"path"
;
import
path
from
"path"
;
...
@@ -37,14 +30,14 @@ export default defineConfig({
...
@@ -37,14 +30,14 @@ export default defineConfig({
},
},
proxy
:
{
proxy
:
{
"/api"
:
{
"/api"
:
{
target
:
"http://localhost:8080"
,
//
target: "http://localhost:8080",
//
target: "http://agent-backend.clouddev.hisense.com",
target
:
"http://agent-backend.clouddev.hisense.com"
,
changeOrigin
:
true
,
changeOrigin
:
true
,
rewrite
:
(
path
)
=>
path
.
replace
(
/^
\/
api/
,
"/api"
),
rewrite
:
(
path
)
=>
path
.
replace
(
/^
\/
api/
,
"/api"
),
},
},
"/ws"
:
{
"/ws"
:
{
target
:
"http://localhost:8080"
,
//
target: "http://localhost:8080",
//
target: "http://agent-backend.clouddev.hisense.com",
target
:
"http://agent-backend.clouddev.hisense.com"
,
ws
:
true
,
// 启用WebSocket代理
ws
:
true
,
// 启用WebSocket代理
changeOrigin
:
true
,
changeOrigin
:
true
,
},
},
...
@@ -54,6 +47,30 @@ export default defineConfig({
...
@@ -54,6 +47,30 @@ export default defineConfig({
target
:
"esnext"
,
target
:
"esnext"
,
minify
:
"terser"
,
minify
:
"terser"
,
sourcemap
:
false
,
sourcemap
:
false
,
rollupOptions
:
{
output
:
{
manualChunks
(
id
)
{
if
(
id
.
includes
(
"node_modules/echarts"
))
{
return
"echarts"
;
}
if
(
id
.
includes
(
"tinymce"
))
{
return
"tinymce"
;
}
if
(
id
.
includes
(
"@babel/standalone"
))
{
return
"babel-standalone"
;
}
if
(
id
.
includes
(
"pangea-component"
))
{
return
"pangea-component"
;
}
/* !id.endsWith(".css") 是为了解决拆包后的样式问题 */
if
(
id
.
includes
(
"pangea-ui"
)
&&
!
id
.
endsWith
(
".css"
))
{
return
"pangea-ui"
;
}
return
undefined
;
// 其他模块的处理逻辑
},
},
},
},
},
esbuild
:
{
esbuild
:
{
jsxFactory
:
"h"
,
jsxFactory
:
"h"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment