js.commonjs-* options are great we need something like js.esm-loader and implement loader hooks
https://nodejs.org/api/esm.html#esm_experimental_loaders
it would also be great to have the same settings for esm
// (optional) folder where the NPM modules to be loaded are located.
options.put("js.commonjs-require-cwd", "/path/to/root/folder");
// (optional) initialization script to pre-define globals.
options.put("js.commonjs-global-properties", "./globals.js");
// (optional) Node.js built-in replacements as a comma separated list.
options.put("js.commonjs-core-modules-replacements",
"buffer:buffer/," +
"path:path-browserify");
ESM loaders and other ECMAScript modules-related features in Node.js are still marked as experimental APIs, and they might change in the future. We will implement them once they are stable.
Most helpful comment
ESM loaders and other ECMAScript modules-related features in Node.js are still marked as experimental APIs, and they might change in the future. We will implement them once they are stable.