With ES6, I can import several exports from a file like this:
import {ThingA, ThingB, ThingC} from \'lib/things\';
However, I like the orga
I was able to take from user atilkan's approach and modify it a bit:
For Typescript users;
require.context('@/folder/with/modules', false, /\.ts$/).keys().forEach((fileName => {
import('@/folder/with/modules' + fileName).then((mod) => {
(window as any)[fileName] = mod[fileName];
const module = new (window as any)[fileName]();
// use module
});
}));