index.js 220 B

12345678910
  1. const files = require.context('.', false, /\.js$/)
  2. const modules = []
  3. files.keys().forEach(key => {
  4. if (key === './index.js') return
  5. const item = files(key).default
  6. modules.push(...item)
  7. })
  8. export default modules