From a7c646191dade29f508d3f43e4ca4c1c5d8d5559 Mon Sep 17 00:00:00 2001 From: Trent Mick Date: Thu, 19 Feb 2015 20:41:34 -0800 Subject: [PATCH] Hide 'source-map-support' require from browserify. Fixes #219 --- CHANGES.md | 1 + lib/bunyan.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 8fba0b1..068e91a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -8,6 +8,7 @@ Known issues: ## bunyan 1.3.4 (not yet released) +- [issue #219] Hide 'source-map-support' require from browserify. - [issue #218] Reset `haveNonRawStreams` on `.addStream`. diff --git a/lib/bunyan.js b/lib/bunyan.js index f7b4d9e..c74c108 100644 --- a/lib/bunyan.js +++ b/lib/bunyan.js @@ -60,7 +60,8 @@ var isBrowser = function () { return typeof (window) !== 'undefined' && this === window; }(); try { - var sourceMapSupport = require('source-map-support'); + /* Use `+ ''` to hide this import from browserify. */ + var sourceMapSupport = require('source-map-support' + ''); } catch (_) { sourceMapSupport = null; }