fix for older node verisons

This commit is contained in:
Mark Molinaro 2022-01-17 20:45:42 -08:00
parent 718bd9bc1e
commit 822c3b33cf
1 changed files with 9 additions and 5 deletions

View File

@ -344,11 +344,15 @@ const interceptAllJavascriptModulesPluginHooks = (compilation, tracer) => {
const makeInterceptorFor = (instance, tracer) => hookName => ({
register: ({ name, type, context, fn }) => {
const newFn = makeNewProfiledTapFn(hookName, tracer, {
name,
type,
fn
});
const newFn =
// Don't tap our own hooks to ensure stream can close cleanly
name === pluginName
? fn
: makeNewProfiledTapFn(hookName, tracer, {
name,
type,
fn
});
return {
name,
type,