emscripten-core/emscripten

EXPORT_ES6 + proxy-to-worker produces broken code

Open

#14.164 geöffnet am 12. Mai 2021

Auf GitHub ansehen
 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)C++ (3.519 Forks)batch import
good first bughelp wanted

Repository-Metriken

Stars
 (27.361 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 19T 10h) (147 gemergte PRs in 30 T)

Beschreibung

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.

Contributor Guide