run-plugin-webpack

raw JSON →
1.0.0 verified Sat Apr 25 auth: no javascript

Provides a basic class for creating Webpack plugins. Version 1.0.0 offers a straightforward structure to extend and implement the `apply` method. Released as an initial version with minimal documentation. Differentiates by being a minimal base class for Webpack plugin development.

error Cannot find module 'run-plugin-webpack'
cause Package not installed or incorrect import path.
fix
Run npm install run-plugin-webpack --save-dev and ensure import is correct.
gotcha Package documentation is incomplete; README only contains 'TO DO.'
fix Refer to source or contact maintainer for usage details.
npm install run-plugin-webpack
yarn add run-plugin-webpack
pnpm add run-plugin-webpack

Shows how to extend RunPluginWebpack to create a custom Webpack plugin.

import { RunPluginWebpack } from 'run-plugin-webpack';

class MyPlugin extends RunPluginWebpack {
  apply(compiler) {
    compiler.hooks.done.tap('MyPlugin', () => {
      console.log('Build completed!');
    });
  }
}

module.exports = MyPlugin;