event-callback-webpack-plugin

1.1.2 • Public • Published

event-callback-webpack-plugin

NPM version Travis Build Status devDependencies Status Greenkeeper badge

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 or object webpack events.
  • callback - (optional) callback function.

Contribution

Feel free to push your code if you agree with publishing under the MIT license.

Changelog

License

Package Sidebar

Install

npm i event-callback-webpack-plugin

Weekly Downloads

2

Version

1.1.2

License

MIT

Last publish

Collaborators

  • cap-bernardito
  • evilebottnawi
  • itgalaxy-owner