Skip to content

sable-virt/webpack-entries

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

webpack-entries

webpack glob entry

npm i webpack-entries --save-dev

webpack.config.js

var entries = require('webpack-entries');
module.exports = {
    entry: entries('./src/js/*.js',true)
};

entries(pattern,multiple):(Array|Object)

  • pattern(string): glob pattern
  • multiple(boolean): multiple entry points object

example

var entries = require('webpack-entries');
entries('./src/js/*.js');

[
    './src/js/a.js',
    './src/js/b.js'
]
var entries = require('webpack-entries');
entries('./src/js/*.js',true);

{
    a: './src/js/a.js',
    b: './src/js/b.js'
}
var entries = require('webpack-entries');
entries('./src/**/*.js',true);

{
    'js/a': './src/js/a.js',
    'js/b': './src/js/b.js'
}

Releases

No releases published

Packages

No packages published