Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[ENGG-1977] MV3: 2KB limit for regexFilter in DNR

未关闭
#47 3 条评论 5 个 reaction 已指派 0 人 在 GitHub 查看

已经有一个关联 PR 被合并了。

  • #1869 来自 @wrongsahil —— 已合并

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
typescript
领域
devtools

调研方向

Start by reproducing the Chrome declarativeNetRequest error with host-based regex rules and review the linked regex-rules documentation. Compare the suggested URL source conditions and redirect-rule approach against the affected replace-rule use cases. Done means supported rules no longer exceed the 2KB compiled regexFilter limit.

由索引模型根据 Issue 内容生成。

描述

type:bug

When creating host regex rules Unchecked runtime.lastError: Rule with id 1 was skipped as the "regexFilter" value exceeded the 2KB memory limit when compiled. Learn more: https://developer.chrome.com/docs/extensions/reference/api/declarativeNetRequest#regex-rules

Possible Solutions

1. Using URL source conditions instead of HOST source conditions

If you are using HOST - EQUALS | CONTAINS | MATCHES | WILDCARD, then try switching it to URL source condition.

2. Try using Redirect Rule

Almost all the usecases that are supported by replace rule are also supported by Redirect Rule . Try creating a redirect rule instead

Some patterns to convert Replace rule into Redirect rule

Pattern 1

Current Replace Rule
CleanShot 2024-06-27 at 12 51 57@2x

Converted Redirect Rule
CleanShot 2024-06-27 at 12 55 11@2x

Pattern 2

Current Replace Rule
CleanShot 2024-06-27 at 13 36 51@2x

Converted Redirect Rule
CleanShot 2024-06-27 at 13 37 23@2x

主要语言
TypeScript
星标
96
派生
25
平均合并
1 天 14 小时
30 天内合并 PR
2

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

requestly/interceptor 的其他 Issue

查看 requestly/interceptor 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。