An open API service indexing awesome lists of open source software.

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.

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`
```