[FEATURE REQUEST] enable with-js-error by default?
Are there any caveats for enabling with-js-error optimization by default? According to this SO answer perf hit for capturing the stack is quite affordable. It's quite hard to debug exceptions without backtraces and dune currently gives no option to enable this flag globally.
Or maybe the behavior could be changed to match that of OCAMLRUNPARAM=b, i.e. always call some hook during exception throwing, and have it determine if new Error() needs to be created based on some property of environment (if we're running on node.js, we could parse OCAMLRUNPARAM environment variable, not sure what would be the best way to toggle this flag in browser, read some key from local storage?).
xref #1071