event-callback-webpack-plugin
v1.1.2
Published
Webpack plugin that gives ability to add callback after webpack event
Downloads
8
Readme
event-callback-webpack-plugin
Add callbacks to webpack events.
Install
npm install --save-dev event-callback-webpack-plugin
Usage
import EventCallbackWebpackPlugin from 'event-callback-webpack-plugin';
export default {
plugins: [
new EventCallbackWebpackPlugin('done', () => {
console.log('Hello `done`!');
})
]
};
Or
import EventCallbackWebpackPlugin from 'event-callback-webpack-plugin';
export default {
plugins: [
new EventCallbackWebpackPlugin({
emit: (compilation, callback) => {
console.log('Hello `emit`!');
return callback();
},
'after-emit': (compilation, callback) => {
console.log('Hello `after-emit`!');
return callback();
}
})
]
};
Options
events
- (require)string
orobject
webpack events.callback
- (optional) callback function.
Contribution
Feel free to push your code if you agree with publishing under the MIT license.