Jacob
2026-10-12 bea1211a5687ac2ed46d92db5eefa15248b6aa1e
fix: manifest 生成时忽略行尾差异避免无意义重写
1个文件已修改
3 ■■■■■ 已修改文件
scripts/manifest.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
scripts/manifest.js
....@@ -95,7 +95,8 @@
9595
9696 if (exists) {
9797 const prev = fs.readFileSync(TARGET, 'utf8');
98
- if (prev === rendered) {
98
+ // 行尾差异(CRLF/LF)不算变化,避免无意义重写
99
+ if (prev.replace(/\r\n/g, '\n') === rendered.replace(/\r\n/g, '\n')) {
99100 console.log('[manifest] manifest.json 已是目标内容,无需重写');
100101 return { file: TARGET, changed: false };
101102 }