emscripten-core/emscripten

EXPORT_ES6 + proxy-to-worker produces broken code

Open

#14,164 建立於 2021年5月12日

在 GitHub 查看
 (0 留言) (0 反應) (0 負責人)C++ (3,519 fork)batch import
good first bughelp wanted

倉庫指標

Star
 (27,361 star)
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.

貢獻者指南