Bradley Farias
Bradley Farias
It got pushed back in part due to page length of the change, I'm taking hiatus from trying to push it through.
Hiya @seiyria ! Thanks for the investigation. Unfortunately neither the spec, nor the engines allow for hot reloading at this time. There could be future investigations with things like the...
This is because `--loader` forces the ESM resolution algorithm not CJS resolution, and extension-less files are not resolved by default for ESM, see https://github.com/nodejs/node/pull/31415
Overall, this is the intended behavior we got to after problems with having support for files lacking extensions in the ESM resolver; so I wouldn't think we need to fix...
@guybedford backwards compatibility breakage came from --loader, without --loader it still worked fine
> Suppose I'm making a module that's explicitly node-only. What do I have to do to load a native module? Do users have to add a flag just to use...
@ljharb I do not see this as a constraint, but rather a useful step in iterating so that we can ensure the end result of our process is what we...
@ljharb > @bmeck because of extensionless flies and type module, I’m not convinced that it won’t be a breaking change to add default extension resolution later. If this is considered...
@ljharb because thats how existing [extension resolution works](https://nodejs.org/api/modules.html#modules_all_together) (see LOAD_AS_FILE); this had the historical reasoning that it should check the exact specifier first since it could be a real file...
* https://github.com/nodejs/node/pull/31021 appears to need to be done to ensure we don't load `node bin/foo.wasm` as ESM like we currently do.