Skip to content

Instantly share code, notes, and snippets.

@dtothefp
Created September 5, 2015 19:08
Show Gist options
  • Save dtothefp/854903a38216e57f41ee to your computer and use it in GitHub Desktop.
Save dtothefp/854903a38216e57f41ee to your computer and use it in GitHub Desktop.
const requireTest = require.context('./test', true, /_test\.js$/);
requireTest.keys().forEach(requireTest); //stolen directly from @shama
@zhangzewei
Copy link

hello, i wanna ask that how are you achieving the function require.context, because i got an error require.context is not a function, thx. please reply me soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment