Skip to content

Commit 42a068a

Browse files
committed
fix: 🐛 修复 AdGuard 版和 jsDelivr 版资源链接错误导致无法运行的 bug
#273
1 parent f39751a commit 42a068a

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

release.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const exec = (...commands) => {
4141
writeFileSync(
4242
path.join(__dirname, './ComicRead-jsDelivr.user.js'),
4343
code.replaceAll(
44-
/registry\.npmmirror\.com\/([^/]+)\/([^/]+)\/files\/(.+)/g,
44+
/registry\.npmmirror\.com\/(.+)\/(\d+\.\d+\.\d)\/files\/(.+)/g,
4545
'cdn.jsdelivr.net/npm/$1@$2/$3',
4646
),
4747
);

rollup.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ if (!isDevMode)
281281
// 不知道为啥俄罗斯访问不了 npmmirror,只能改用 jsdelivr
282282
// https://github.com/hymbz/ComicReadScript/issues/170
283283
code = code.replaceAll(
284-
/registry\.npmmirror\.com\/([^/]+)\/([^/]+)\/files\/(.+)/g,
284+
/registry\.npmmirror\.com\/(.+)\/(\d+\.\d+\.\d)\/files\/(.+)/g,
285285
'cdn.jsdelivr.net/npm/$1@$2/$3',
286286
);
287287

0 commit comments

Comments
 (0)