[Feature Request]: Remove dependency on intl-messageformat
维护者通常 2 天内回复
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 20/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- react, typescript
- 领域
- frontend, performance
调研方向
Start with the linked pull request #4758 and the draft branch, which demonstrate replacing intl-messageformat and changing the I18n.Provider messages type. Read the “Supporting additional locales” example in the internationalization documentation to understand the current raw-string usage and migration path. Done means the dependency is removed and users have a documented way to provide compiled messages; work is already underway in the open pull request.
由索引模型根据 Issue 内容生成。
描述
Description
Cloudscape brings in intl-messageformat, which adds ~40KB to the minified JS bundle. But the built-in internationalization functionality doesn't use it. The dependency is only needed if users provide raw ICU strings to the messages property in I18n.Provider, as in the "Supporting additional locales" example here: https://cloudscape.design/get-started/for-developers/internationalization/#supporting-additional-locales
Using that dependency at runtime is an anti-pattern: Even for folks who need to add messages for additional locales, they should be compiling those messages at build time (like Cloudscape does for its own built-in locales) rather than making the browser do it.
I've drafted a branch that shows how the intl-messageformat dependency could be replaced: https://github.com/TrevorBurnham/cloudscape-components/tree/streamline-i18n-parser On that branch I've changed the TypeScript type of I18n.provider's messages prop so that it no longer accepts raw strings. That means that folks using that functionality would get a build-time error instead of a run-time failure. Combine that with a straightforward migration path away from those raw strings, and you'd have a nice easy performance win.
Code of Conduct
- I agree to follow this project's Code of Conduct
- I checked the current issues for duplicate requests
- 主要语言
- TypeScript
- 星标
- 2.7k
- 派生
- 248
- 平均合并
- 3 天 2 小时
- 30 天内合并 PR
- 81
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
cloudscape-design/components 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 76/100
cloudscape-design/components#5184 · 2 条评论 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
cloudscape-design/components#5152 · 1 条评论 ·
维护者通常 2 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 15/100
cloudscape-design/components#5149 · 1 条评论 ·
维护者通常 2 天内回复
-
bug
难度 4/5 3-5 天 新手友好度 45/100
cloudscape-design/components#5117 · 2 条评论 ·
维护者通常 2 天内回复
-
难度 5/5 一周以上 新手友好度 35/100
cloudscape-design/components#5106 · 1 条评论 ·
维护者通常 2 天内回复
查看 cloudscape-design/components 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 85/100
Slaymish/HealthAgent#7 ·
-
area: engine topic: math type: bug
难度 2/5 1-3 小时 新手友好度 80/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 70/100
Get-Concord-AI/concord-mcp#310 ·
维护者通常 1 天内回复
-
Correct install_claude: 'marketplace add' over a different source is refused, not replaced in place未关闭type:bug
难度 2/5 1-3 小时 新手友好度 80/100
nightgauge/nightgauge#2804 ·
维护者通常 1 天内回复