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

https://github.com/diegohaz/webpack-child-config-plugin

A webpack plugin that runs/watches another config
https://github.com/diegohaz/webpack-child-config-plugin

webpack webpack-plugin

Last synced: about 1 year ago
JSON representation

A webpack plugin that runs/watches another config

Awesome Lists containing this project

README

          

# webpack-child-config-plugin

[![Generated with nod](https://img.shields.io/badge/generator-nod-2196F3.svg?style=flat-square)](https://github.com/diegohaz/nod)
[![NPM version](https://img.shields.io/npm/v/webpack-child-config-plugin.svg?style=flat-square)](https://npmjs.org/package/webpack-child-config-plugin)
[![Build Status](https://img.shields.io/travis/diegohaz/webpack-child-config-plugin/master.svg?style=flat-square)](https://travis-ci.org/diegohaz/webpack-child-config-plugin) [![Coverage Status](https://img.shields.io/codecov/c/github/diegohaz/webpack-child-config-plugin/master.svg?style=flat-square)](https://codecov.io/gh/diegohaz/webpack-child-config-plugin/branch/master)

A webpack plugin that runs/watches another config

## Install

$ npm install --save-dev webpack-child-config-plugin

## Usage

```js
import ChildConfigPlugin from 'webpack-child-config-plugin'

const serverConfig = {
...
watch: true
...
}

const clientConfig = {
...
plugins: [
new ChildConfigPlugin(serverConfig, {
// these are the defaults, you can override them
watch: serverConfig.watch,
when: 'done',
compilerCallback: () => {}
})
]
}
```

## License

MIT © [Diego Haz](https://github.com/diegohaz)