npm i THIS_URL
When this guide is more complete, the plan is to move it into Prepack documentation.
For now I put it out as a gist to gather initial feedback.
I started using React 3.5 years ago, and I still love it. It was such a well-designed solution that not much has changed since then, only superficial stuff like naming. What I learned then is still wholly applicable today because it's such a good idea (although now you can choose from many other libraries). On top of that, we now benefit from an entirely new architecture (fiber) without changing much.
|const some_module = require('some_module')|
|* require('some_module') calls Module._load|
|* Module._load then tries to load the module with a filename (also save it to the cache) using module.load(filename)|
|* module.load(filename), given a filename, passes it to the proper extension handler ('.js', '.json')|
|* If there were any errors when loading the file, it deletes the file from the cache (delete Module._cache[filename]) and throws an error|