Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var imports = {};
- function importAll(r) {
- r.keys().forEach(key => {
- const module = r(key);
- const name = key.split("./")[1].split(".")[0];
- imports[name] = module.default;
- });
- }
- importAll(require.context("./", true, /\.jsx$/));
- module.exports = imports;
Add Comment
Please, Sign In to add comment