Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-resource
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-resource
Commits
77b13272
提交
77b13272
authored
3月 24, 2026
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 更新 Vite 配置,调整生产环境和学校模式的基础路径,优化插件配置
上级
e535338e
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
8 行增加
和
15 行删除
+8
-15
vite.config.ts
vite.config.ts
+8
-15
没有找到文件。
vite.config.ts
浏览文件 @
77b13272
...
@@ -4,41 +4,34 @@ import { fileURLToPath, URL } from 'url'
...
@@ -4,41 +4,34 @@ import { fileURLToPath, URL } from 'url'
import
{
defineConfig
}
from
'vite'
import
{
defineConfig
}
from
'vite'
import
vue
from
'@vitejs/plugin-vue'
import
vue
from
'@vitejs/plugin-vue'
// import checker from 'vite-plugin-checker'
import
AutoImport
from
'unplugin-auto-import/vite'
import
AutoImport
from
'unplugin-auto-import/vite'
import
mkcert
from
'vite-plugin-mkcert'
import
mkcert
from
'vite-plugin-mkcert'
export
default
defineConfig
(({
mode
})
=>
({
export
default
defineConfig
(({
mode
})
=>
({
base
:
mode
===
'
prod'
?
'https://webapp-pub.ezijing.com/website/prod/center-resource/'
:
'
/'
,
base
:
mode
===
'
school'
?
'/'
:
'https://webapp-pub.ezijing.com/website/prod/center-resource
/'
,
plugins
:
[
plugins
:
[
vue
(),
vue
(),
AutoImport
({
AutoImport
({
imports
:
[
'vue'
,
'vue-router'
,
'@vueuse/core'
],
imports
:
[
'vue'
,
'vue-router'
,
'@vueuse/core'
],
dts
:
true
,
dts
:
true
,
eslintrc
:
{
enabled
:
true
}
eslintrc
:
{
enabled
:
true
}
,
}),
}),
mkcert
()
mkcert
(),
// checker({ vueTsc: true, eslint: { lintCommand: 'eslint "./src/**/*.{vue,js,jsx,ts,tsx}"' } })
],
],
server
:
{
server
:
{
open
:
true
,
open
:
true
,
host
:
'dev.ezijing.com'
,
host
:
'dev.ezijing.com'
,
https
:
{
https
:
{
key
:
fs
.
readFileSync
(
path
.
join
(
__dirname
,
'./https/dev.ezijing.com.key'
)),
key
:
fs
.
readFileSync
(
path
.
join
(
__dirname
,
'./https/dev.ezijing.com.key'
)),
cert
:
fs
.
readFileSync
(
path
.
join
(
__dirname
,
'./https/dev.ezijing.com.pem'
))
cert
:
fs
.
readFileSync
(
path
.
join
(
__dirname
,
'./https/dev.ezijing.com.pem'
))
,
},
},
proxy
:
{
proxy
:
{
'/api/qbs'
:
{
'/api'
:
'https://resource-center.ezijing.com'
,
target
:
'https://question-api.ezijing.com'
,
changeOrigin
:
true
,
rewrite
:
path
=>
path
.
replace
(
/^
\/
api
\/
qbs/
,
''
)
},
},
'/api'
:
'https://resource-center.ezijing.com'
}
},
},
resolve
:
{
resolve
:
{
alias
:
{
alias
:
{
'@'
:
fileURLToPath
(
new
URL
(
'./src'
,
import
.
meta
.
url
))
'@'
:
fileURLToPath
(
new
URL
(
'./src'
,
import
.
meta
.
url
))
,
}
}
,
}
}
,
}))
}))
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论