From what I understand, dart2js --server-mode is meant for Dart code compiled to JS that runs in a language runtime and not in a browser. However, it seems like the setting isn't really implemented properly to me, as the compiled code still has large sections in it that are meant to run on browsers which don't seem to be properly switched off when --server-mode is passed. Additionally I also found other problems with --server-mode, one being that the main function, on top of being compiled into JS that, again, is meant to run in browsers and wouldn't work properly in a runtime that isn't a browser, also seems to not be invoked correctly, passing an empty array instead of any arguments that the main function wants. With all these problems with --server-mode, I'd like to ask whether it has been implemented fully, or if the implementation is still incomplete. If it is the latter, I'd like to properly implement it, so could I ask that it remain as is for now and not be removed? I realize that this group is pretty much never checked now (With the last post from 2019!) but I didn't know where else to ask, so hopefully this post isn't going into the void.
Have a great day!
-Joseph