Skip to content

Commit 6554845

Browse files
committed
fix: failing tests, typo, and missing .tap fn
1 parent 54178cb commit 6554845

File tree

5 files changed

+6
-9
lines changed

5 files changed

+6
-9
lines changed

lib/AmdMainTemplatePlugin.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,9 @@ class AmdMainTemplatePlugin {
4545
};
4646

4747
for(const template of [mainTemplate, chunkTemplate]) {
48-
template.hooks.renderWithEntry("AmdMainTemplatePlugin", onRenderWithEntry);
48+
template.hooks.renderWithEntry.tap("AmdMainTemplatePlugin", onRenderWithEntry);
4949
}
5050

51-
5251
mainTemplate.hooks.globalHashPaths.tap("AmdMainTemplatePlugin", paths => {
5352
if(this.name) paths.push(this.name);
5453
return paths;

lib/ExportPropertyMainTemplatePlugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class ExportPropertyMainTemplatePlugin {
2727
};
2828

2929
for(const template of [mainTemplate, chunkTemplate]) {
30-
template.hooks.renderWithEntry("ExportPropertyMainTemplatePlugin", onRenderWithEntry);
30+
template.hooks.renderWithEntry.tap("ExportPropertyMainTemplatePlugin", onRenderWithEntry);
3131
}
3232

3333
mainTemplate.hooks.hash.tap("ExportPropertyMainTemplatePlugin", hash => {

lib/SetVarMainTemplatePlugin.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ class SetVarMainTemplatePlugin {
1818
chunkTemplate
1919
} = compilation;
2020

21-
2221
const onRenderWithEntry = (source, chunk, hash) => {
2322
const varExpression = mainTemplate.getAssetPath(this.varExpression, {
2423
hash,
@@ -33,7 +32,7 @@ class SetVarMainTemplatePlugin {
3332
};
3433

3534
for(const template of [mainTemplate, chunkTemplate]) {
36-
template.hooks.renderWithEntry("SetVarMainTemplatePlugin", onRenderWithEntry);
35+
template.hooks.renderWithEntry.tap("SetVarMainTemplatePlugin", onRenderWithEntry);
3736
}
3837

3938
mainTemplate.hooks.globalHashPaths.tap("SetVarMainTemplatePlugin", paths => {

lib/UmdMainTemplatePlugin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,10 @@ class UmdMainTemplatePlugin {
179179
};
180180

181181
for(const template of [mainTemplate, chunkTemplate]) {
182-
template.hooks.renderWithEntry("UmdMainTemplatePlugin", onRenderWithEntry);
182+
template.hooks.renderWithEntry.tap("UmdMainTemplatePlugin", onRenderWithEntry);
183183
}
184184

185-
mainTemplate.hooks.globalHasPaths.tap("UmdMainTemplatePlugin", (paths) => {
185+
mainTemplate.hooks.globalHashPaths.tap("UmdMainTemplatePlugin", (paths) => {
186186
if(this.names.root) paths = paths.concat(this.names.root);
187187
if(this.names.amd) paths = paths.concat(this.names.amd);
188188
if(this.names.commonjs) paths = paths.concat(this.names.commonjs);

lib/web/JsonpExportMainTemplatePlugin.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ class JsonpExportMainTemplatePlugin {
1717
chunkTemplate
1818
} = compilation;
1919

20-
2120
const onRenderWithEntry = (source, chunk, hash) => {
2221
const name = mainTemplate.getAssetPath(this.name || "", {
2322
hash,
@@ -27,7 +26,7 @@ class JsonpExportMainTemplatePlugin {
2726
};
2827

2928
for(const template of [mainTemplate, chunkTemplate]) {
30-
template.hooks.renderWithEntry("JsonpExportMainTemplatePlugin", onRenderWithEntry);
29+
template.hooks.renderWithEntry.tap("JsonpExportMainTemplatePlugin", onRenderWithEntry);
3130
}
3231

3332
mainTemplate.hooks.globalHashPaths.tap("JsonpExportMainTemplatePlugin", paths => {

0 commit comments

Comments
 (0)