Skip to content

Commit 822c3b3

Browse files
committed
fix for older node verisons
1 parent 718bd9b commit 822c3b3

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

lib/debug/ProfilingPlugin.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -344,11 +344,15 @@ const interceptAllJavascriptModulesPluginHooks = (compilation, tracer) => {
344344

345345
const makeInterceptorFor = (instance, tracer) => hookName => ({
346346
register: ({ name, type, context, fn }) => {
347-
const newFn = makeNewProfiledTapFn(hookName, tracer, {
348-
name,
349-
type,
350-
fn
351-
});
347+
const newFn =
348+
// Don't tap our own hooks to ensure stream can close cleanly
349+
name === pluginName
350+
? fn
351+
: makeNewProfiledTapFn(hookName, tracer, {
352+
name,
353+
type,
354+
fn
355+
});
352356
return {
353357
name,
354358
type,

0 commit comments

Comments
 (0)