https://github.com/afeiship/webpack-entries
Webpack config that can easy get multi entries.
https://github.com/afeiship/webpack-entries
entry glob webpack
Last synced: 2 months ago
JSON representation
Webpack config that can easy get multi entries.
- Host: GitHub
- URL: https://github.com/afeiship/webpack-entries
- Owner: afeiship
- License: mit
- Created: 2016-08-29T02:37:07.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-04-25T15:44:23.000Z (about 7 years ago)
- Last Synced: 2025-02-07T11:31:05.362Z (4 months ago)
- Topics: entry, glob, webpack
- Language: JavaScript
- Size: 6.84 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# webpack-entries
> Get webpack entries from glob path.(For spa/multple pages configurations)## usage:
```javascript
//Only one module for SPA project:
var webpackEntries = entries('src/modules/my-module/index.js');//Multi modules use glob expression:
var webpackEntries = entries('src/modules/**/index.js');//Multi modules use array:
var webpackEntries = entries(['src/modules/my-module1/index.js','src/modules/my-module2/index.js']);
```## windows path join:
```javascript//the result of path.join:
var path="c:\\eset\\adfo";//but:display: c:\eset\adfo
console.log(path);//resolve:
console.log(path.replace(/\\/g,'/'));//if you use this string for test:
console.log("c:\eset\adfo");//This will be display:`c:esetadfo`
```