I really like the auto-importer. One optimization though:
Since you're appending all your module files with .store.js you can just change your regex to: const requireModule = require.context('.', false, /\.store.js$/);
and that allows you to get rid of if (filename === './index.js') return;
I really like the auto-importer. One optimization though:
Since you're appending all your module files with
.store.js
you can just change your regex to:const requireModule = require.context('.', false, /\.store.js$/);
and that allows you to get rid of
if (filename === './index.js') return;
Yes! Thanks for the suggestion Matthew ✨