docs: 插件 SRI 与换行符(Windows autocrlf)记录
This commit is contained in:
1 parent
1f94249282
commit
7577b66b78
1 file changed
+7
@@ -105,3 +105,10 @@ node scripts/gen-market.js && node scripts/gen-market-page.js
|
||||
- 插件版本独立于客户端版本:客户端 3.26.x 与插件 1.9.x/1.14.x 互不绑定。
|
||||
- 插件改动**不需要**重打客户端(桌面包不含插件);发完市场,用户重启客户端即生效。
|
||||
- 客户端需要新插件能力(新宿主 API)时,先在桌面仓实现并发布客户端,再升插件版本依赖它——顺序不能反。
|
||||
|
||||
## 8. 换行符与 SRI(2026-12-03 Windows 实测)
|
||||
|
||||
- 现象:Windows 构建机(`core.autocrlf=true`)出的包里,`plugin-style-source.*.js` 的 SRI 校验失败,WebView2 拒绝执行该插件;构建本身不报错。
|
||||
- 根因:插件产物是逐字拷进 dist 的,CRLF 让字节和 `plugins/index.json` 里记的哈希对不上;`git status` 看不出(text 归一化)。
|
||||
- 已修:`scripts/copy-plugins.js` 写 dist 时对 `.js/.css/.json/.html/.svg/.txt/.md` 统一转 LF;`scripts/check-dist.js` 新增「dist/plugins 逐条 vs index.json 哈希」校验(`verify:ci` 会跑)。
|
||||
- 以后新增「逐字拷贝」的文件类型,必须同时进 `TEXT_EXT` 或保持二进制,别让它带着平台换行进包。
|
||||
Reference in new issue
Block a user