Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jpommerening/additional-compile-webpack-plugin
Start a child-compilation after webpack compiled the main assets
https://github.com/jpommerening/additional-compile-webpack-plugin
Last synced: 24 days ago
JSON representation
Start a child-compilation after webpack compiled the main assets
- Host: GitHub
- URL: https://github.com/jpommerening/additional-compile-webpack-plugin
- Owner: jpommerening
- Created: 2017-05-18T14:18:58.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-05-30T13:26:30.000Z (over 7 years ago)
- Last Synced: 2024-10-01T23:47:02.003Z (about 2 months ago)
- Language: JavaScript
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# additional-compile-webpack-plugin
> Yo dawg!
> I put a compiler in your compiler, so you can compile ~while~ _after_ you compile!This plugin enables you to start another compile step with access to the
output of the main compilation.For example, if your current `webpack` setup generates `dist/lib.js`, with this
plugin you can configure a child compilation step that executes after
`dist/lib.js` has been built, so you can `require()` it.# Usage
The plugin expects a `webpack` configuration object during initialization.
Currently only `entry`, `output` and `plugins` are supported. In addition to
that, the child compilation inherits the configuration of the main compilation.Example:
```js
const AdditionalCompilePlugin = require( 'additional-compile-webpack-plugin' );
const path = require( 'path' );module.exports = {
entry: {
lib: './index.js'
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: '[name].js'
},
plugins: [
new PostCompilePlugin({
entry: {
example1: './examples/example1.js',
example2: './examples/example2.js'
}
})
]
};
```