I was wondering if the use of this directory was no longer needed as I see some newer projects use a /lib folder for shared code and then their /client and /server folders for code specific to those environments.
Or is it still best to use a single entry point ( a file per environment ) in both the /client and /server folders and import everything in that single file to control loading order and also what will get loaded?
where the image below depicts how a project should be laid out
And if someone could explain to me how the importing of files in the way described above will result in those files being loaded lazily? I mean i can understand un-imported files being left out what is delivered to the client or server, but they all get loaded at startup, right? its not like only when you visit a page will the necessary files be loaded and if you never visit they never get loaded. or is that the case?