webpack loader to load files at once with glob
npm install --save-dev @eagle/glob-loader
Change: export object instead of an array
https://github.com/Graf009/glob-loader.git
- Create a glob pattern file (example:
dir.pattern
) - Write the pattern of the files that you want to require
- Require it with
glob-loader
Pattern is relative to the file directory.
./dir/**/*.js
var modules = require("glob-loader!./dir.pattern");
- source map