Nodejs is hardwired with NPM and the package.json that leads to be forced as long as developers do depend on that to be compatible with json and do additional resolve steps while when lock files exists they are the better format..
While the most best format would be Stealify Lang Modules
Current workaround is to use the -r[] --require[] flags pre node 19.1 with the esm module
after node 19.1 you can use -i [] --import[] to load ESM before frozen intrinsics that allows you to not depend on the package.json and get a clean engine will also be the favored interop mode between chromium b8g and legacy nodejs
Nodejs is hardwired with NPM and the package.json that leads to be forced as long as developers do depend on that to be compatible with json and do additional resolve steps while when lock files exists they are the better format..
While the most best format would be Stealify Lang Modules
Current workaround is to use the -r[] --require[] flags pre node 19.1 with the esm module
after node 19.1 you can use -i [] --import[] to load ESM before frozen intrinsics that allows you to not depend on the package.json and get a clean engine will also be the favored interop mode between chromium b8g and legacy nodejs