process: clarify the pre- and post-condition of esm setup
This patch:
- Clarifies the dependency of the ESM loader initialization
(
process.cwd()
and the value of--loader
) innode.js
. - Moves the initialization of the per-isolate
importModuleDynamically
andinitializeImportMetaObject
callbacks intonode.js
- Moves the initialization of the ESM loader into
prepareUserCodeExecution()
since it potentially involves execution of user code (similar to--require
for CJS modules).
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines