This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @param {string} context context path for entry | |
* @param {Dependency} entry entry dependency that should be followed | |
* @param {string | EntryOptions} optionsOrName options or deprecated name of entry | |
* @param {ModuleCallback} callback callback function | |
* @returns {void} returns | |
*/ | |
addEntry(context, entry, optionsOrName, callback) { | |
// TODO webpack 6 remove | |
const options = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var hook = new SyncHook(); | |
hook.tap("callback", () => "hello") | |
hook.call(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Hook { | |
constructor(){ | |
this.hookedFunctions = []; | |
} | |
hookFunction(functionToHook){ | |
this.hookedFunctions.push(functionToHook); | |
} | |
callHook(){ |