emscripten icon indicating copy to clipboard operation
emscripten copied to clipboard

MODULARIZE=1 adds code incompatible with MIN_NODE_VERSION=101900

Open mzoliker opened this issue 9 months ago • 0 comments

Hi! Using emscripten v3.1.59, here are the two lines at the very beginning that should be fixed:

  var _scriptName = typeof document != 'undefined' ? document.currentScript?.src : undefined;
  if (typeof __filename != 'undefined') _scriptName ||= __filename;

The optional chaining operator (?.) and the logical OR assignment (||=) are only available in newer versions of NodeJS. Those two lines are added by -sMODULARIZE=1. Thanks a lot for the fix! Kind regards, Maurice

mzoliker avatar May 09 '24 12:05 mzoliker