1.1.2 • Published 7 years ago

event-callback-webpack-plugin v1.1.2

Weekly downloads
33
License
MIT
Repository
github
Last release
7 years ago

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