Fix issues to work with webpack

This commit is contained in:
Denis Izmaylov 2015-07-28 00:02:56 +03:00 committed by Trent Mick
parent bedb2ae7ff
commit 466829dc73

View file

@ -26,16 +26,26 @@ var xxx = function xxx(s) { // internal dev/debug logging
var xxx = function xxx() {}; // comment out to turn on debug logging
var os = require('os');
var fs = require('fs');
var util = require('util');
var assert = require('assert');
try {
if (typeof window === 'undefined') {
var os = require('os');
var fs = require('fs');
try {
/* Use `+ ''` to hide this import from browserify. */
var dtrace = require('dtrace-provider' + '');
} catch (e) {
} catch (e) {
dtrace = null;
}
} else {
var os = {
hostname: function () {
return window.location.host;
}
};
var fs = {};
var dtrace = null;
}
var util = require('util');
var assert = require('assert');
var EventEmitter = require('events').EventEmitter;
try {