From 978f93f4137465498c66fc0b730601e478c26aee Mon Sep 17 00:00:00 2001 From: Voyager Bot Date: Wed, 31 Oct 2018 14:27:01 +0100 Subject: [PATCH 1/3] provide better sourcemaps --- webpack.main.config.js | 4 ++++ webpack.renderer.config.js | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/webpack.main.config.js b/webpack.main.config.js index a2a281f7d4..ddd6698dc5 100644 --- a/webpack.main.config.js +++ b/webpack.main.config.js @@ -6,6 +6,10 @@ const path = require(`path`) const webpack = require(`webpack`) let mainConfig = { + devtool: + process.env.NODE_ENV === `production` + ? `#source-map` + : `#inline-source-map`, entry: { main: path.join(__dirname, `app/src/main/index.js`) }, diff --git a/webpack.renderer.config.js b/webpack.renderer.config.js index 5f6f273098..0bab0286be 100644 --- a/webpack.renderer.config.js +++ b/webpack.renderer.config.js @@ -15,7 +15,10 @@ function resolve(dir) { } let rendererConfig = { - devtool: `#eval-source-map`, + devtool: + process.env.NODE_ENV === `production` + ? `#source-map` + : `#inline-source-map`, entry: { renderer: path.join(__dirname, `app/src/renderer/main.js`) }, From 1fc5cae5cc8661343c97ef9364d71a1607db6b69 Mon Sep 17 00:00:00 2001 From: Voyager Bot Date: Wed, 31 Oct 2018 14:27:51 +0100 Subject: [PATCH 2/3] fix sourcemaps not loaded in dev env --- app/src/main/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/index.js b/app/src/main/index.js index 671d30e9c8..1358ab337b 100644 --- a/app/src/main/index.js +++ b/app/src/main/index.js @@ -141,6 +141,8 @@ function createWindow() { mainWindow.show() if (DEV || JSON.parse(process.env.COSMOS_DEVTOOLS || `false`)) { mainWindow.webContents.openDevTools() + // we need to reload at this point to make sure sourcemaps are loaded correctly + mainWindow.reload() } if (DEV) { mainWindow.maximize() From 4b85cb8f15603c1ab0c4ad8797ad95e6661e40a7 Mon Sep 17 00:00:00 2001 From: Voyager Bot Date: Wed, 31 Oct 2018 14:29:18 +0100 Subject: [PATCH 3/3] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f66ae3975..ba41755711 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. * [\#1446](https://github.com/cosmos/voyager/issues/1446) and [\#1445](https://github.com/cosmos/voyager/issues/1445) Fixed sorting in validator tables. @NodeGuy * [\#1487](https://github.com/cosmos/voyager/issues/1487) Fixed running of local testnet. @NodeGuy * [\#1480](https://github.com/cosmos/voyager/issues/1480) Fixed "duplicate CONN" errors in E2E tests. @NodeGuy +* [\#1451](https://github.com/cosmos/voyager/issues/1451) Provide better sourcemaps to make debugging easier. @faboweb ## [0.10.7] - 2018-10-10