https://github.com/nuintun/webpack-glob-entries-plugin
Provides a way to glob for entry files in Webpack watch and non-watch modes.
https://github.com/nuintun/webpack-glob-entries-plugin
Last synced: about 1 year ago
JSON representation
Provides a way to glob for entry files in Webpack watch and non-watch modes.
- Host: GitHub
- URL: https://github.com/nuintun/webpack-glob-entries-plugin
- Owner: nuintun
- License: mit
- Created: 2018-05-04T14:59:24.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2021-05-03T20:47:29.000Z (about 5 years ago)
- Last Synced: 2024-09-23T14:50:40.877Z (over 1 year ago)
- Language: JavaScript
- Size: 19.5 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# webpack-glob-entries-plugin
> Provides a way to glob for entry files in Webpack watch and non-watch modes.
>
> [![NPM Version][npm-image]][npm-url]
> [![Download Status][download-image]][npm-url]
> ![Node Version][node-image]
> [![Dependencies][david-image]][david-url]
### API
```typescript
new WebpackGlobEntriesPlugin(globs: string|string[], options?: { glob: Object, resolveEntryName: Function });
```
>
> * globs: The glob string or array of glob strings.
> * options: The configure options.
> * options.glob: The [node-glob](https://github.com/isaacs/node-glob) configure options.
> * options.resolveEntryName: The entry name resolve function.
### Usage
```js
const WebpackGlobEntriesPlugin = require('webpack-glob-entries-plugin');
const watcher = new WebpackGlobEntriesPlugin('src/js/pages/**/*.js');
module.exports = {
mode: 'development',
entry: watcher.entries(),
output: {
publicPath: '/dist/',
path: path.resolve('dist'),
filename: 'js/pages/[name].js',
chunkFilename: 'js/chunks/[chunkhash].js'
},
plugins: [watcher]
};
```
### Thanks
> [Milanzor/webpack-watched-glob-entries-plugin](https://github.com/Milanzor/webpack-watched-glob-entries-plugin)
[npm-image]: https://img.shields.io/npm/v/webpack-glob-entries-plugin.svg?style=flat-square
[npm-url]: https://www.npmjs.org/package/webpack-glob-entries-plugin
[download-image]: http://img.shields.io/npm/dm/webpack-glob-entries-plugin.svg?style=flat-square
[node-image]: https://img.shields.io/node/v/webpack-glob-entries-plugin.svg?style=flat-square
[david-image]: http://img.shields.io/david/nuintun/webpack-glob-entries-plugin.svg?style=flat-square
[david-url]: https://david-dm.org/nuintun/webpack-glob-entries-plugin