Skip to content

Instantly share code, notes, and snippets.

@huang-xiao-jian
Created June 1, 2018 07:00
Show Gist options
  • Save huang-xiao-jian/bc3fe070f598bef4424eab196ac1de38 to your computer and use it in GitHub Desktop.
Save huang-xiao-jian/bc3fe070f598bef4424eab196ac1de38 to your computer and use it in GitHub Desktop.
webpack 多模块加载
const req = require.context('../src/stories', true, /\.story\.jsx?$/);
req.keys().forEach((filename) => req(filename));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment