webrays
webrays copied to clipboard
Minification throws error during linking when using emscrpten
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.