emscripten-core / emscripten-core/emscripten

Shouldn't `EXPORT_ES6` use only ES6 semantics?

Open
#20,503 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 6h
Merged PRs (30d)
109

Description

The whole point of this construct is to allow bundlers to identify and package the needed extra files.

https://github.com/emscripten-core/emscripten/blob/054bf307ee8391ffea9037761e3c9e2bc54dcbbe/src/worker.js#L183

However if this is dependent on some extra variable, `webpack` will still choke on this file - as it won't be able to resolve the expression during bundling.

Is the manual override still needed when using ES6? And if yes, shouldn't there be a way to disable it?

This is the absolutely last remaining blocker for webpack to be able to bundle an emscripten-built JS loader that uses workers without any additional configuration. If the project does not use workers, it is already fully compatible.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.