Skip to content

Commit

Permalink
Merge pull request #1506 from cosmos/fabo/1451-provide-better-sourcemaps
Browse files Browse the repository at this point in the history
Fabo/1451 provide better sourcemaps
  • Loading branch information
NodeGuy authored Nov 1, 2018
2 parents a65526b + e98684b commit e808fab
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
* [\#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
* [\#1480](https://github.com/cosmos/voyager/issues/1480) Fixed false detection of node crash in e2e test start. @faboweb
* [\#1451](https://github.com/cosmos/voyager/issues/1451) Provide better sourcemaps to make debugging easier. @faboweb

## [0.10.7] - 2018-10-10

Expand Down
2 changes: 2 additions & 0 deletions app/src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 4 additions & 0 deletions webpack.main.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`)
},
Expand Down
5 changes: 4 additions & 1 deletion webpack.renderer.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`)
},
Expand Down

0 comments on commit e808fab

Please sign in to comment.