mirror of
https://gitee.com/js-yhsec/energy_storage.git
synced 2026-05-27 18:59:26 +08:00
系统总览图表加载销毁优化
This commit is contained in:
@@ -9,27 +9,13 @@ module.exports = defineConfig({
|
||||
// 静态资源目录
|
||||
assetsDir: 'static',
|
||||
devServer: {
|
||||
hot: true,
|
||||
compress: true,
|
||||
allowedHosts: 'all',
|
||||
headers: {
|
||||
// 1. 允许开发环境跨域
|
||||
'Access-Control-Allow-Origin': '*'
|
||||
},
|
||||
historyApiFallback: true,
|
||||
open: false,
|
||||
port: 8080,
|
||||
client: {
|
||||
overlay: {
|
||||
runtimeErrors: (error) => {
|
||||
const ignoreErrors = [
|
||||
'ResizeObserver loop limit exceeded',
|
||||
'ResizeObserver loop completed with undelivered notifications.'
|
||||
]
|
||||
if (ignoreErrors.includes(error.message)) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
proxy: {
|
||||
'/api': {
|
||||
// 代理前缀,可以自定义(如 '/api')
|
||||
target: 'http://192.168.0.187:19801', // 目标服务器地址
|
||||
changeOrigin: true, // 是否改变请求源(跨域必备)
|
||||
pathRewrite: {
|
||||
'^/api': '' // 重写路径,去掉 '/api' 前缀
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user