ant-design / ant-design/x

CodeHighlighter 支持更灵活的配置

Open
#1,647 1 comment 2 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
4.8k
Forks
1.2k
Avg merge
3d 3h
Merged PRs (30d)
2

Description

### 需求动机

现在的 `CodeHighlighter` 粗暴地引入了所有语言的支持,导致打包的 js 体积巨大,着实有点浪费。而且诡异的是为啥 `refractor` 和 `highlight.js` 都被打包进去了,按理来说应该是二选一的。

Image

### 提议的 API 是什么样的?

_No response_

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by inspecting the CodeHighlighter implementation and its current refractor and highlight.js integration; the issue names no source file or test. Trace why all languages are bundled and why both highlighters are included. Done should provide a documented flexible configuration that avoids unnecessary language support and duplicate highlighter bundles.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend, performance
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.