Jacob
4 天以前 bf50dc43351d1a9781a84faf775913e813ea6ecb
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 }