mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
d080f0db1f
This refactors the CommonJS loading a bit to create a center point that handles source loading (`loadSource`) and make format detection more consistent to pave the way for future synchronous hooks. - Handle .mjs in the .js handler, similar to how .cjs has been handled. - Generate the legacy ERR_REQUIRE_ESM in a getRequireESMError() for both .mts and require(esm) handling (when it's disabled). PR-URL: https://github.com/nodejs/node/pull/55590 Refs: https://github.com/nodejs/loaders/pull/198 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> |
||
---|---|---|
.. | ||
cjs | ||
esm | ||
helpers.js | ||
package_json_reader.js | ||
run_main.js | ||
typescript.js |