Skip to content

Commit b3db769

Browse files
cyfung1031CopilotCodFrm
authored
⚡️ 压缩 ts.worker.js 至 4MB 以通过 AMO 验证,修复 MV3 background permission 错误 (#1221)
* enhanced support for cross-browser * Update utils.ts * Update utils.ts * blob -> arrayBuffer to force removing of MIME * fix `content_security_policy` * 改为 ZipExecutionPlugin 做代码压缩,使 ts.worker.js 大小缩减至 4MB ( < 5MB ) * revert changes * 补回 packages - acorn, magic-string, pako * code adjusted * 修订代码 * 修订代码 * No "background" permission in Firefox MV3 * drop pako * 紧急修复: 环境初始化时反注册未正确执行 * v1.3 修正名字: scriptcat-content -> scriptcat-scripting * v1.3 修正反注册未正确执行 * inflateRaw 代码更新 * ZipExecutionPlugin代码调整 * Update pnpm-lock.yaml * Update pnpm-lock.yaml * update to acorn 8.16.0 * Update rspack-plugins/ZipExecutionPlugin.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/pages/components/RuntimeSetting/index.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * 修改代码避免审查问题 * 直接命名导入 import { deflateRawSync } from "zlib" 以避免兼容性问题。 * Update src/pages/components/RuntimeSetting/index.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update rspack-plugins/ZipExecutionPlugin.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update ZipExecutionPlugin.ts * Update ZipExecutionPlugin.ts --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: 王一之 <yz@ggnb.top>
1 parent da16ddf commit b3db769

6 files changed

Lines changed: 768 additions & 98 deletions

File tree

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@
7575
"@types/serviceworker": "^0.0.120",
7676
"@unocss/postcss": "66.5.4",
7777
"@vitest/coverage-v8": "^4.0.18",
78+
"acorn": "^8.16.0",
79+
"uglify-js":"^3.19.3",
7880
"autoprefixer": "^10.4.21",
7981
"cross-env": "^10.1.0",
8082
"crx": "^5.0.1",
@@ -89,6 +91,7 @@
8991
"iconv-lite": "^0.7.2",
9092
"jsdom": "^26.1.0",
9193
"jszip": "^3.10.1",
94+
"magic-string": "^0.30.21",
9295
"mock-xmlhttprequest": "^8.4.1",
9396
"postcss": "^8.5.6",
9497
"postcss-loader": "^8.2.0",

pnpm-lock.yaml

Lines changed: 51 additions & 57 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)