diff --git a/lib/AmdMainTemplatePlugin.js b/lib/AmdMainTemplatePlugin.js index 5883c99b1..8cd744493 100644 --- a/lib/AmdMainTemplatePlugin.js +++ b/lib/AmdMainTemplatePlugin.js @@ -45,10 +45,9 @@ class AmdMainTemplatePlugin { }; for(const template of [mainTemplate, chunkTemplate]) { - template.hooks.renderWithEntry("AmdMainTemplatePlugin", onRenderWithEntry); + template.hooks.renderWithEntry.tap("AmdMainTemplatePlugin", onRenderWithEntry); } - mainTemplate.hooks.globalHashPaths.tap("AmdMainTemplatePlugin", paths => { if(this.name) paths.push(this.name); return paths; diff --git a/lib/ExportPropertyMainTemplatePlugin.js b/lib/ExportPropertyMainTemplatePlugin.js index 0d1f55fd5..deed51db4 100644 --- a/lib/ExportPropertyMainTemplatePlugin.js +++ b/lib/ExportPropertyMainTemplatePlugin.js @@ -27,7 +27,7 @@ class ExportPropertyMainTemplatePlugin { }; for(const template of [mainTemplate, chunkTemplate]) { - template.hooks.renderWithEntry("ExportPropertyMainTemplatePlugin", onRenderWithEntry); + template.hooks.renderWithEntry.tap("ExportPropertyMainTemplatePlugin", onRenderWithEntry); } mainTemplate.hooks.hash.tap("ExportPropertyMainTemplatePlugin", hash => { diff --git a/lib/SetVarMainTemplatePlugin.js b/lib/SetVarMainTemplatePlugin.js index 7bebf3d62..4a25f399a 100644 --- a/lib/SetVarMainTemplatePlugin.js +++ b/lib/SetVarMainTemplatePlugin.js @@ -18,7 +18,6 @@ class SetVarMainTemplatePlugin { chunkTemplate } = compilation; - const onRenderWithEntry = (source, chunk, hash) => { const varExpression = mainTemplate.getAssetPath(this.varExpression, { hash, @@ -33,7 +32,7 @@ class SetVarMainTemplatePlugin { }; for(const template of [mainTemplate, chunkTemplate]) { - template.hooks.renderWithEntry("SetVarMainTemplatePlugin", onRenderWithEntry); + template.hooks.renderWithEntry.tap("SetVarMainTemplatePlugin", onRenderWithEntry); } mainTemplate.hooks.globalHashPaths.tap("SetVarMainTemplatePlugin", paths => { diff --git a/lib/UmdMainTemplatePlugin.js b/lib/UmdMainTemplatePlugin.js index 7813a188f..23dde87f9 100644 --- a/lib/UmdMainTemplatePlugin.js +++ b/lib/UmdMainTemplatePlugin.js @@ -179,10 +179,10 @@ class UmdMainTemplatePlugin { }; for(const template of [mainTemplate, chunkTemplate]) { - template.hooks.renderWithEntry("UmdMainTemplatePlugin", onRenderWithEntry); + template.hooks.renderWithEntry.tap("UmdMainTemplatePlugin", onRenderWithEntry); } - mainTemplate.hooks.globalHasPaths.tap("UmdMainTemplatePlugin", (paths) => { + mainTemplate.hooks.globalHashPaths.tap("UmdMainTemplatePlugin", (paths) => { if(this.names.root) paths = paths.concat(this.names.root); if(this.names.amd) paths = paths.concat(this.names.amd); if(this.names.commonjs) paths = paths.concat(this.names.commonjs); diff --git a/lib/web/JsonpExportMainTemplatePlugin.js b/lib/web/JsonpExportMainTemplatePlugin.js index d4029151a..4b08e514d 100644 --- a/lib/web/JsonpExportMainTemplatePlugin.js +++ b/lib/web/JsonpExportMainTemplatePlugin.js @@ -17,7 +17,6 @@ class JsonpExportMainTemplatePlugin { chunkTemplate } = compilation; - const onRenderWithEntry = (source, chunk, hash) => { const name = mainTemplate.getAssetPath(this.name || "", { hash, @@ -27,7 +26,7 @@ class JsonpExportMainTemplatePlugin { }; for(const template of [mainTemplate, chunkTemplate]) { - template.hooks.renderWithEntry("JsonpExportMainTemplatePlugin", onRenderWithEntry); + template.hooks.renderWithEntry.tap("JsonpExportMainTemplatePlugin", onRenderWithEntry); } mainTemplate.hooks.globalHashPaths.tap("JsonpExportMainTemplatePlugin", paths => {