emscripten-core/emscripten

EXPORT_ES6 + proxy-to-worker produces broken code

开放

#14,164 创建于 2021年5月12日

 (0 条评论) (0 个反应) (0 位负责人)C++ (3,519 个派生)batch import
good first bughelp wanted

仓库指标

星标
 (27,361 个星标)
PR 合并指标
 (平均合并 19天 10小时) (30 天内合并 147 个 PR)

描述

This combination of options currently produces a Worker that contains an ES6 export, and main JS that is not an ES module. Then, main JS tries to instantiate a Worker and waits for messages from it, but they never come, since it's just exporting a lazy Module factory.

I see we emit error for regular MODULARIZE:

-s MODULARIZE=1 is not compatible with --proxy-to-worker (if you want to run in a worker with -s MODULARIZE=1, you likely want to do the worker side setup manually)

but for some reason not for EXPORT_ES6 even though one normally auto-enables another.

贡献者指南