webpack-glob-entry
simple function to transform glob patterns in webpack entry object
Last updated 4 years ago by thecotne .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install webpack-glob-entry 
SYNC missed versions from official npm registry.

webpack-glob-entry

Package Quality JavaScript Style Guide

Travis Build Status Coveralls NPM Dependencies NPM DevDependencies

bitHound Overall Score bitHound Dependencies bitHound Dev Dependencies bitHound Code

npms score NSP Status NPM Downloads NPM Package Version

simple function to transform glob patterns in webpack entry object

install

npm install webpack-glob-entry --save-dev

usage

simply call entry function with glob pattern

var entry = require('webpack-glob-entry')

module.exports = {
  entry: entry('js/*.entry.js'),
  output: {
    path: 'public/build',
    publicPath: 'build',
    filename: '[name].bundle.js',
    chunkFilename: '[id].chunk.js'
  }
}

you can also pass multiple glob patterns like this

  entry: entry('foo/*.js', 'bar/*.js', 'baz/*.js'),

you can also pass entryName function as first argument like this

var path = require('path')

module.exports = {
  entry: entry(filePath => path.basename(filePath), 'bar/*.js', 'baz/*.js')
}

you can also use entry.basePath function as first argument like this


module.exports = {
  entry: entry(entry.basePath(), 'bar/*.js', 'baz/*.js')
}

# or like this

module.exports = {
  entry: entry(entry.basePath('src'), 'src/bar/*.js', 'src/baz/*.js')
}

# or like this

module.exports = {
  entry: entry(entry.basePath('src', '.js'), 'src/bar/*.some.js', 'src/baz/*.js')
}

Current Tags

  • 2.1.1                                ...           latest (4 years ago)

18 Versions

  • 2.1.1                                ...           4 years ago
  • 2.1.0                                ...           4 years ago
  • 2.0.3                                ...           4 years ago
  • 2.0.2                                ...           4 years ago
  • 2.0.1                                ...           4 years ago
  • 2.0.0                                ...           4 years ago
  • 1.2.7                                ...           4 years ago
  • 1.2.6                                ...           4 years ago
  • 1.2.5                                ...           4 years ago
  • 1.2.4                                ...           4 years ago
  • 1.2.3                                ...           4 years ago
  • 1.2.2                                ...           4 years ago
  • 1.2.1                                ...           4 years ago
  • 1.2.0                                ...           4 years ago
  • 1.1.0                                ...           4 years ago
  • 1.0.2                                ...           4 years ago
  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           4 years ago

Copyright 2014 - 2016 © taobao.org |