Closed wycats closed 7 years ago
/cc @bmeck have a description of what this means?
When discussing the affect of Node making a choice for modules we end up discussing the whole ecosystem of JavaScript.
The point here is about how browsers/servers will interact in terms of interop. This encompasses 2 specifications: type=module from HTML and Loader. type=module
has no plan or mechanism to integrate with non-ES modules. Loader
is meant to provide hooks to integrate against non-ES modules, like consuming JSON, or creating client side transforms.
In order for package.json
data to be synced to the browser for Loader
, any server/technology tracking how node is handling ES/CJS module detection will need to have the package.json
available to them. Systems are not always setup to handle separate files as meta data for a source text.
There have been mentions of loader manifests being sent down, but I have not seen package.json
related to those discussions. This could also be a duplication of effort, but I would presume manifests would pre-compute all the values rather than filter upon lookup.
In the section referring to the
package.json
style of solution, this issue is raised:I would appreciate more information on what issue this is referring to. I'd be happy to write a PR expanding on the issue once I understand it. :smile: