esm: exit the process with an error if loader has an issue
Previously, this would trigger an unhandled rejection that the user cannot handle.
Fixes: https://github.com/nodejs/node/issues/30205
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines