$ npm install --save webpack-add-entry
const addEntry = require('webpack-add-entry')
const webpackConfig = {entry: './entry.js'}
webpackConfig.entry = addEntry(webpackConfig.entry, './new-entry.js')
//=> entry: ['./entry.js', './new-entry.js']
Returns the new entry without mutating the old one.
Type: string
array
object
Required: true
Webpack entry.
Type: string
Required: true
New webpack entry to add.
One of key
and to
is required.
Type: string
Add a new chunk entry, eg:
addEntry({client: './client.js'}, './server.js', {key: 'server'})
/*
{
client: './client.js',
server: './server.js'
}
*/
Type: string
Add to a chunk entry, eg:
addEntry({client: './client.js', './server.js', {to: 'client'}})
/*
{
client: ['./client.js', './server.js']
}
*/
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D