webpack-import-glob
ES6 import with glob patterns (preloader for Webpack)
Expands globbing patterns for ES6 import
statements.
// Forked of https://github.com/terpiljenya/import-glob
;
Expands into
;;; modules = module0 module1 module2
For side effects:
;
Expands into
;;
For sass:
;
Expands into
;;
Install
npm install import-glob --save-dev
Usage
You can use it one of two ways, the recommended way is to use it as a preloader
module: preloaders: test: /\.js/ loader: 'import-glob' test: /\.scss/ loader: 'import-glob' // or test: /\.js$/ enforce: 'pre' loader: 'import-glob'
Alternatively you can use it as a chained loader