From ac9388062e6757c69af95f4b3e9329b7fd4c8721 Mon Sep 17 00:00:00 2001 From: Alexandre Borela Date: Tue, 30 May 2017 07:01:35 -0300 Subject: [PATCH] fix: webpack paths --- src/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index e8c511e..f595f85 100755 --- a/src/index.js +++ b/src/index.js @@ -37,8 +37,9 @@ export class RedBoxError extends Component { mapError(error) { mapStackTrace(error.stack, mappedStack => { const mappedError = error; - mappedError.stack = mappedStack.join('\n'); - this.setState({ error: mappedError }); + mappedError.stack = mappedStack.join('\n') + .replace(/webpack:\/{3}/g, 'webpack:///.') + this.setState({ error: mappedError }) }); }