In the browser, the DOM is parsed and scripts are loaded and parsed in the order they are defined.
In Node.js, how are scripts loaded into memory?
Is the entire graph of scripts defined by the require
statements in each file traversed at initialisation-time, with the resulting objects and values hydrating the stack and heap ready for execution to start?