mirror of https://github.com/webpack/webpack.git
fix: failing tests, typo, and missing .tap fn
This commit is contained in:
parent
54178cbc19
commit
6554845d18
|
@ -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;
|
||||
|
|
|
@ -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 => {
|
||||
|
|
|
@ -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 => {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 => {
|
||||
|
|
Loading…
Reference in New Issue