mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 19:08:59 -05:00
[PR #17613] [CLOSED] feat: Dynamically load highlight.js language supports to speed up page loading (-2.9MB) #63343
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/17613
Author: @ShirasawaSama
Created: 9/20/2025
Status: ❌ Closed
Base:
dev← Head:feat/dynamically-load-highlight.js📝 Commits (1)
0d14d63feat: Dynamically load highlight.js language supports📊 Changes
8 files changed (+517 additions, -133 deletions)
View changed files
📝
package-lock.json(+127 -108)📝
package.json(+1 -3)📝
src/lib/components/chat/Messages/CodeBlock.svelte(+23 -8)📝
src/lib/components/common/RichTextInput.svelte(+2 -6)➕
src/lib/utils/hljs/LowlightEditorExtension.ts(+221 -0)➕
src/lib/utils/hljs/index.ts(+95 -0)📝
src/lib/utils/index.ts(+1 -6)📝
vite.config.ts(+47 -2)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
Added
Changed
Deprecated
Removed
Fixed
Security
Breaking Changes
Additional Information
#17250 Thanks @rgaricano
I believe releasing the
LowlightEditorExtension.tsfile as a separate npm module might be a better option (for example, it could be namedtiptap-extension-code-block-lowlight-dynamic).Screenshots or Videos
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.