Skip to content

Commit

Permalink
fix: bypass webpack for lazy required version of winston
Browse files Browse the repository at this point in the history
  • Loading branch information
Pooya Parsa committed Jan 2, 2019
1 parent 920444a commit 500b509
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/reporters/winston.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
// This reporter is compatible with Winston 3
// https://github.com/winstonjs/winston

const _require = require // bypass webpack

export default class WinstonReporter {
constructor (logger) {
if (logger && logger.log) {
this.logger = logger
} else {
const winston = require('winston')
const winston = _require('winston')

this.logger = winston.createLogger(Object.assign({
level: 'info',
Expand Down

0 comments on commit 500b509

Please sign in to comment.