From 498fb2dae3318d51d4e390a282c59a91b1d59a1c Mon Sep 17 00:00:00 2001 From: Teeeeeeeerry Date: Fri, 4 Sep 2026 14:46:02 +1000 Subject: [PATCH 1/2] =?UTF-8?q?=E6=BA=90=E7=A0=81=E5=8C=85=E6=8E=92?= =?UTF-8?q?=E9=99=A4=E6=96=87=E6=A1=A3=E3=80=81=E5=95=86=E5=BA=97=E7=B4=A0?= =?UTF-8?q?=E6=9D=90=E4=B8=8E=E6=B5=8B=E8=AF=95=E4=BA=A7=E7=89=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Firefox 的 AMO 要求随扩展提交源码包。wxt 默认把整个仓库塞进去, 实测 5.1MB 里有 4.3MB 是无关内容:docs/testing/logs/ 下每次跑测试 都会重写的覆盖率与 playwright 报告(单个 HTML 就 528KB)、商店截图 1.6MB、设计稿,对复现构建毫无用处。 加 zip.excludeSources 后降到 278KB,src / entrypoints / public / scripts / patches 与全部构建配置、README、LICENSE 均在。 Co-Authored-By: zhexuancai-uts <261878103+zhexuancai-uts@users.noreply.github.com> --- wxt.config.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/wxt.config.ts b/wxt.config.ts index 90151ad..311a7c9 100644 --- a/wxt.config.ts +++ b/wxt.config.ts @@ -91,6 +91,13 @@ export default defineConfig({ }, }), }), + // Firefox 的 AMO 要求随扩展提交源码包,里面只需要能重现构建的东西。 + // 默认规则会把整个仓库塞进去 —— 文档、商店截图、设计稿,以及 + // docs/testing/logs/ 下每次跑测试都会重写的覆盖率与报告产物, + // 合计约 4.3MB,对复现构建毫无用处,还让审核者多下载 20 倍体积。 + zip: { + excludeSources: ['docs/**', 'store/**', 'design/**'], + }, vite: () => ({ plugins: [blockTestFiles()], }), From 3c8fdbe1da06b44f04365911871101bdd7549753 Mon Sep 17 00:00:00 2001 From: Teeeeeeeerry Date: Fri, 4 Sep 2026 16:15:35 +1000 Subject: [PATCH 2/2] =?UTF-8?q?README=20=E6=9B=B4=E6=AD=A3=20Firefox=20?= =?UTF-8?q?=E7=9A=84=20manifest=20=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 第 5 行把三个浏览器一并写作 Manifest V3,实际打包产物里只有 Chrome 与 Edge 是 mv3,Firefox 是 mv2 —— WXT 对 Firefox 的默认 目标,host 权限并入 permissions。发 release 核对产物时发现。 Co-Authored-By: zhexuancai-uts <261878103+zhexuancai-uts@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b8a32db..9385ec9 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ 对照式网页翻译浏览器扩展。原文与译文并排呈现,让阅读外语内容不必在两个界面之间来回切换。 -Chrome / Edge / Firefox,Manifest V3,当前 v2.0。 +Chrome / Edge(Manifest V3)· Firefox(MV2),当前 v2.0。 ## 特性