-
-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: getLogger not defined in child loader #130
fix: getLogger not defined in child loader #130
Conversation
10e497d
to
d864a0b
Compare
d864a0b
to
b4418ae
Compare
Hello, just following up on this bugfix. This is a live issue affecting any build configurations using |
console.debug(`${name}: ${message}`); | ||
}, | ||
}; | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally we should run webpack logger here, otherwise options from configuration for logging will not work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we map methods created logger, we can have more them error
/warn
/log
/debug
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just bumping this PR for some clarification.
Can we map methods created logger, we can have more them
error
/warn
/log
/debug
@alexander-akait Do you mean to just loop through the list of methods instead of manually specifying them? e.g.
const methods = ['error', 'warn', 'log', 'debug']];
const logger = {}
for (const key of methods ) {
logger[key] = ...
}
return logger;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexander-akait Nudging this PR to see what's blocking it?
@alexander-akait Would really appreciate a resolution to this. It's blocking my team from upgrading less-loader. |
This PR fixes #10 and #185.
This PR contains a:
Motivation / Use-Case
Currently
thread-loader
is not compatible withless-loader
, as outlined in #10 which was closed without resolution.less-loader
callsthis.getLogger
, whichworker.js
hadn't defined when callingloaderRunner.runLoaders
, so it crashed. I set upgetLogger
to simply write to the child process's console, instead of messaging back to the parent process - thePoolWorker
doesn't currently have access to the parent loader'sgetLogger
function and it seemed like too big of a change to pass it in. I'm open to changing this (but would prefer to get this fix released as soon as possible since it's a live issue.)Thanks!
Breaking Changes
None
Additional Info