laravel-mix
Version:
Laravel Mix is an elegant wrapper around Webpack for the 80% use case.
22 lines (19 loc) • 388 B
JavaScript
class BuildCallbackPlugin {
/**
* Create a new plugin instance.
*
* @param {Function} callback
*/
constructor(callback) {
this.callback = callback;
}
/**
* Apply the plugin.
*
* @param {Object} compiler
*/
apply(compiler) {
compiler.plugin('done', this.callback);
}
}
module.exports = BuildCallbackPlugin;