3.8.1插件面板导入fontmin库,然后再次打开面板时报错。

5
[Window] failed to compile wasm module: RangeError: WebAssembly.Compile is disallowed on the main thread, if the buffer size is larger than 4KB. Use WebAssembly.compile, or compile on a worker thread.

[Window] Panel[font-min] cannot be loaded - WebAssembly.Compile is disallowed on the main thread, if the buffer size is larger than 4KB. Use WebAssembly.compile, or compile on a worker thread.

有人遇到过吗

有遇到过,需要改一点, fontmin 库的代码
这个插件已经解决这个问题了,可以参考下
cocos store:mini-font

这个构建时进行裁剪我自己实现了,我是想打开面板,面板有个生成按钮,点击生成后进行裁剪 :rofl:

找到了曲线救国的方法了,把裁剪写成一个nodejs脚本,然后通过插件代码的exec执行node命令来裁剪

问题就是Creator编辑器的环境,直接运行这个node库会报错

如果不依赖编辑器环境,用命令行执行,需要保证电脑有配置nodejs的环境哦