mirror of
https://github.com/YFGaia/dify-plus.git
synced 2026-06-04 10:14:00 +08:00
feat: admin-web新增js导入的资源路径环境变量
This commit is contained in:
@@ -13,3 +13,6 @@ VITE_EDITOR = vscode
|
||||
VITE_OA_LOGIN_CLINET_ID =
|
||||
# oa地址
|
||||
VITE_OA_URL =
|
||||
|
||||
# 编译后js导入的资源路径
|
||||
JS_PATH =
|
||||
@@ -5,3 +5,6 @@ VITE_BASE_API = /api
|
||||
VITE_FILE_API = /api
|
||||
#下方修改为你的线上ip(如果需要在线使用表单构建工具时使用,其余情况无需使用以下环境变量)
|
||||
VITE_BASE_PATH =
|
||||
|
||||
# 编译后js导入的资源路径
|
||||
JS_PATH =
|
||||
@@ -46,9 +46,14 @@ export default ({
|
||||
assetFileNames: 'admin/assets/[name].[hash].[ext]',
|
||||
},
|
||||
}
|
||||
|
||||
let base = '/'
|
||||
if (process.env.JS_PATH) {
|
||||
base = process.env.JS_PATH + '/'
|
||||
}
|
||||
|
||||
const config = {
|
||||
base: '/', // 编译后js导入的资源路径
|
||||
base: base, // 编译后js导入的资源路径
|
||||
root: './', // index.html文件所在位置
|
||||
publicDir: 'public', // 静态资源文件夹
|
||||
resolve: {
|
||||
|
||||
Reference in New Issue
Block a user