This is my file structure
-main.js -SomeDir -fileA.js -fileB.js
What should I do if I want to load (inside main.js) ever
main.js
One approach could be to create an index.js file in SomeDir location and in that file:
var req = require.context('./', true, /\.js$/); req([]);
Then in main.js:
require('./SomeDir');
or
require('./SomeDir/index.js');
or even
import something from "./SomeDir";