14 lines
289 B
JavaScript
14 lines
289 B
JavaScript
var testPlugin = function () {
|
|
var counter = 1;
|
|
this.hooks.compilation.tap("TestPlugin", compilation => {
|
|
var nr = counter++;
|
|
compilation.hooks.needAdditionalPass.tap("TestPlugin", function () {
|
|
if (nr < 5) return true;
|
|
});
|
|
});
|
|
};
|
|
|
|
module.exports = {
|
|
plugins: [testPlugin]
|
|
};
|