Skip to content

fix(markdown): 支持Vditor离线部署配置 #9316#1333

Open
jeecgai wants to merge 1 commit into
jeecgboot:masterfrom
jeecgai:fix/issue-9316-vditor-cdn
Open

fix(markdown): 支持Vditor离线部署配置 #9316#1333
jeecgai wants to merge 1 commit into
jeecgboot:masterfrom
jeecgai:fix/issue-9316-vditor-cdn

Conversation

@jeecgai

@jeecgai jeecgai commented Jan 29, 2026

Copy link
Copy Markdown

问题描述

修复 jeecgboot/JeecgBoot#9316

知识库手动录入功能离线无法使用,因为Markdown组件(Vditor)依赖外网CDN加载资源。

修复方案

添加VITE_VDITOR_CDN环境变量,支持自定义CDN地址,离线部署时可设置为本地路径。

离线部署步骤

# 1. 复制vditor资源到public目录
cp -r node_modules/vditor/dist public/vditor

# 2. 在.env中配置
VITE_VDITOR_CDN=/vditor

# 3. 重新构建
pnpm build

测试

  • 默认CDN配置正常工作
  • 自定义本地路径配置正常工作

问题:知识库手动录入功能离线无法使用,因为Vditor依赖CDN加载资源

修复:
- 添加VITE_VDITOR_CDN环境变量支持自定义CDN地址
- 离线部署时可设置为本地路径如 /vditor

使用方法:
1. 将node_modules/vditor/dist目录复制到public/vditor
2. 在.env中设置VITE_VDITOR_CDN=/vditor
3. 重新构建项目
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants