dirname-shim.js you want __dirname and __filname in the browser, plus structured stacktraces(__stacktrace). Now you have em. Works in webpack or UMD. Testing The Mocha is still brewing... Enjoy, -Abbey Hawk Sparrow