1.1.2 • Published 8 years ago
event-callback-webpack-plugin v1.1.2
event-callback-webpack-plugin
Add callbacks to webpack events.
Install
npm install --save-dev event-callback-webpack-pluginUsage
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)stringorobjectwebpack events.callback- (optional) callback function.
Contribution
Feel free to push your code if you agree with publishing under the MIT license.