mirror of https://github.com/webpack/webpack.git
				
				
				
			
		
			
				
	
	
		
			18 lines
		
	
	
		
			406 B
		
	
	
	
		
			JavaScript
		
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			406 B
		
	
	
	
		
			JavaScript
		
	
	
	
| "use strict";
 | |
| 
 | |
| /** @type {import("../../../../").WebpackPluginFunction} */
 | |
| function testPlugin() {
 | |
| 	let counter = 1;
 | |
| 	this.hooks.compilation.tap("TestPlugin", (compilation) => {
 | |
| 		const nr = counter++;
 | |
| 		compilation.hooks.needAdditionalPass.tap("TestPlugin", () => {
 | |
| 			if (nr < 5) return true;
 | |
| 		});
 | |
| 	});
 | |
| }
 | |
| 
 | |
| /** @type {import("../../../../").Configuration} */
 | |
| module.exports = {
 | |
| 	plugins: [testPlugin]
 | |
| };
 |