This commit is contained in:
Lam Wei Li 2022-02-02 03:05:42 +08:00
parent 163c7a1eeb
commit 8b44299454
No known key found for this signature in database
GPG Key ID: 90F6ABECF080D7BF

View File

@ -39,7 +39,7 @@ const tryLoading = (modulePath, config) => {
const loadAppenderModule = (type, config) => coreAppenders.get(type)
|| tryLoading(`./${type}`, config)
|| tryLoading(type, config)
|| (require.main && tryLoading(path.join(path.dirname(require.main.filename), type), config))
|| (require.main && require.main.filename && tryLoading(path.join(path.dirname(require.main.filename), type), config))
|| tryLoading(path.join(process.cwd(), type), config);
const appendersLoading = new Set();