node
node copied to clipboard
module: resolve format for all situations with auto module detection on
triggered by #53015 solves: #53016
this should be a consistent fix to always resolve the module format correctly.
Enabling module detection by default made a few other tests need some adjustments because in this case they don't generate errors anymore. e.g. test-esm-cjs-exports.js
instead of error becasue a .mjs imports a .js with ESM syntax it now successfully imports it and generates the warning that this should be fixed to avoid the performance penalty.
Kindly please review and let me know what you think (if changes are necessary).
make test && make lint
=> green
Co-authored-by: @GeoffreyBooth
@nodejs/loaders