fix: worker无法使用 #145

This commit is contained in:
msojocs 2025-05-23 20:32:34 +08:00
parent df2d94f3f2
commit 75ea918b71
3 changed files with 4 additions and 9 deletions

View File

@ -1,5 +1,6 @@
# 1.06.2503290-3 / 2025-05-
- update: compiler(Linux) v0.1.5
- fix: worker无法使用 #145
# 1.06.2503290-2 / 2025-05-02
- update: compiler(Linux) v0.1.4

10
test/wxvpkg-test Normal file → Executable file
View File

@ -4,12 +4,4 @@ root_dir=$(cd `dirname $0`/.. && pwd -P)
tmp_dir="$root_dir/tmp"
# unpack 文件 到 路径
node "$root_dir/tools/wxvpkg/unpack" "$tmp_dir/core.wxvpkg" "$tmp_dir/core.wxvpkg.ext"
# pack 路径 到 文件
node "$root_dir/tools/wxvpkg/pack" "$tmp_dir/core.wxvpkg.ext" "$tmp_dir/core.wxvpkg.test"
# unpack 文件 到 路径
rm -rf "$tmp_dir/core.wxvpkg.ext1"
node "$root_dir/tools/wxvpkg/unpack" "$tmp_dir/core.wxvpkg.test" "$tmp_dir/core.wxvpkg.ext1"
node "$root_dir/tools/wxvpkg_unpack.js" "/home/msojocs/.config/wechat-devtools/WeappVendor/3.8.5.wxvpkg" "/home/msojocs/.config/wechat-devtools/WeappVendor/3.8.5.wxvpkg.ext"

View File

@ -13,6 +13,8 @@ const parseFile = function (path) {
content.name = "wechat-devtools";
// 开启调试,更新参数
content['chromium-args'] = content['chromium-args'].replace('--disable-devtools', '--mixed-context').replace('--ignore-gpu-blacklist', '--ignore-gpu-blocklist')
// fix worker #145
.replace('--js-flags=--harmony-weak-refs', '--enable-features=SharedArrayBuffer')
content.window.height = content.window.width = 1000
fs.writeFileSync(path, JSON.stringify(content));