webrays icon indicating copy to clipboard operation
webrays copied to clipboard

Minification throws error during linking when using emscrpten

Open ViNeek opened this issue 4 years ago • 0 comments

When using the --pre-js flag during linking, emscripten uses acorn to minify the resulting JavaScript library. We are compiling webrays as a module and the acorn-optimizer throws the following error:

SyntaxError: 'import' and 'export' may appear only with 'sourceType: module' (31:0)

Current solution is to use the --extern-pre-js flag which skips the minification process since the webrays library is by itself quiet small. As we move forward, we will definitely have to find a fix or workaround.

ViNeek avatar Jul 30 '21 11:07 ViNeek