Skip to content

Instantly share code, notes, and snippets.

@jefferydutra
Created June 23, 2018 19:09
Show Gist options
  • Save jefferydutra/33dfffff0130e43d40923e8def9e014e to your computer and use it in GitHub Desktop.
Save jefferydutra/33dfffff0130e43d40923e8def9e014e to your computer and use it in GitHub Desktop.
const glob = require('glob');
const entryArray = glob.sync('js/apps/**/index.js');
const entry = entryArray.reduce((acc, item) => {
const name = item.replace('/index.js', '');
acc[name.replace('js', '')] = `./${item}`;
return acc;
}, {});
entry.vendor = [
'babel-polyfill',
'lodash',
'react',
'react-addons-linked-state-mixin',
'react-dom',
'react-bootstrap',
'react-router',
'react-widgets',
'redux',
'moment'
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment