Have an index.js file in each importable local folder with the public exports of that folder, like init.py is used for in Python. This way you can directly import that folder without needing to specify the file (require('folder') vs. require('folder/file.js')).
Have an index.js file in each importable local folder with the public exports of that folder, like init.py is used for in Python. This way you can directly import that folder without needing to specify the file (require('folder') vs. require('folder/file.js')).