Skip to content

realtomaszkula/event-hooks-webpack-plugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Event Hooks Webpack Plugin

npm npm license

This webpack plugin is similar to webpack-shell-plugin but this allows you to execute arbitrary JavaScript instead of commands on any event hook that is exposed by the Webpack compiler.

Compatibility
Version ^2.0.0 of this plugin is compatible with webpack ^4.0.0. If you're using an older version of webpack, make sure to install the ^1.0.0 (npm install event-hooks-webpack-plugin@^1.0.0) release of this plugin.

Installation

npm install event-hooks-webpack-plugin --save-dev

Usage

const EventHooksPlugin = require('event-hooks-webpack-plugin');

module.exports = {
    // ...
    plugins: [
        new EventHooksPlugin({
            'eventName': () => {
                // ...
            }
        })
    ]
}

Options

The plugin consumes an object with webpack compiler event hook names (e.g. run, compile, or done) as keys and functions as values.

License

This project is licensed under the MIT license.

About

Event hooks plugin for Webpack

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%