14 lines
280 B
JavaScript
14 lines
280 B
JavaScript
class ExamplePlugin {
|
|
constructor(props) {
|
|
this.props = props;
|
|
}
|
|
|
|
apply(compiler) {
|
|
compiler.plugin("run", (compiler, callback) => {
|
|
console.log("Webpack is running our plugin", this.props.msg);
|
|
callback();
|
|
});
|
|
}
|
|
}
|
|
|
|
module.exports = ExamplePlugin;
|