emscripten-core / emscripten-core/emscripten
file-packager js output not working with closure and --pre-js
- Lingua principale
- C++
- Stelle
- 27.6k
- Fork
- 3.6k
- Merge medio
- 1g 14h
- PR unite (30g)
- 125
Descrizione
I'm getting the following closure error when adding the output of file-packager using `--pre-js`:
> ERROR - [JSC_VAR_MULTIPLY_DECLARED_ERROR] Variable Module declared more than once.
Using `--preload-file` instead works fine which leads me to believe this is a bug.
Commands for completeness:
```bash
file_packager.py testapp.resources.data --preload testapp/resources@resources --js-output=testapp.resources.js --use-preload-cache
em++ -s WASM=1 -DNDEBUG -O3 -s ENVIRONMENT=web -s MODULARIZE -s EXPORT_NAME=createModule -flto --closure 1 -s FORCE_FILESYSTEM --pre-js testapp.resources.js [...]
```
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Run the supplied file_packager.py and em++ commands with Closure enabled, then inspect testapp.resources.js for repeated Module declarations and compare the --preload-file path. Done means the generated file-packager output can be passed via --pre-js with --closure 1 without the reported JSC_VAR_MULTIPLY_DECLARED_ERROR.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript, wasm
- Ambito
- build-system, tooling
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100