How to properly require files into another file
问题 I have a bunch of js script files that use require to require the same series of libraries, etc.' let path = require('path'); let _ = require('underscore'); I want to put all these requirements into a separate library file that I can then reuse amongst the files that need them. I though I could do something like this: var common = function() { this.requireFiles = function() { let path = require('path'); let _ = require('underscore'); ... } }; export.common = common; However, when I want to