emscripten-core/emscripten

EXPORT_ES6 + proxy-to-worker produces broken code

Aberta

#14.164 aberto em 12 de mai. de 2021

 (0 comentário) (0 reação) (0 responsável)C++ (3.519 forks)batch import
good first bughelp wanted

Métricas do repositório

Stars
 (27.361 estrelas)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

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.

Guia do colaborador