From 027135eef641ec8e23ca45cd7b6040cdbb4b1f12 Mon Sep 17 00:00:00 2001 From: Kyle Robinson Young Date: Mon, 30 Aug 2021 19:57:11 -0700 Subject: [PATCH] Update comments to indicate it works with webpack 4 and 5 --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 9cb5573..4a578ce 100644 --- a/index.js +++ b/index.js @@ -222,7 +222,7 @@ module.exports = function (options, wp, done) { const fs = compiler.outputFileSystem = cache.mfs; const assetEmittedPlugin = compiler.hooks - // Webpack 4 + // Webpack 4/5 ? function (callback) { compiler.hooks.assetEmitted.tapAsync('WebpackStream', callback); } // Webpack 2/3 : function (callback) { compiler.plugin('asset-emitted', callback); }; @@ -244,7 +244,7 @@ module.exports = function (options, wp, done) { if (options.watch && !isSilent) { const watchRunPlugin = compiler.hooks - // Webpack 4 + // Webpack 4/5 ? callback => compiler.hooks.watchRun.tapAsync('WebpackInfo', callback) // Webpack 2/3 : callback => compiler.plugin('watch-run', callback);