Skip to content

Commit

Permalink
Update webpack configs to add second entry points
Browse files Browse the repository at this point in the history
  • Loading branch information
Sayuki0x committed Dec 21, 2019
1 parent e94b3fa commit 78e3e74
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
5 changes: 0 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,12 @@
".git": true,
".eslintcache": true,
"app/dist": true,
"app/main.prod.js": true,
"app/main.prod.js.map": true,
"bower_components": true,
"dll": true,
"release": true,
"node_modules": true,
"npm-debug.log.*": true,
"test/**/__snapshots__": true,
"yarn.lock": true
},
"files.exclude": {
"**/**.prod.*": true
}
}
6 changes: 6 additions & 0 deletions configs/webpack.config.renderer.dev.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ export default merge.smart(baseConfig, {
`webpack-dev-server/client?http://localhost:${port}/`,
'webpack/hot/only-dev-server',
require.resolve('../app/mainWindow/index')
],
backendWindow: [
...(process.env.PLAIN_HMR ? [] : ['react-hot-loader/patch']),
`webpack-dev-server/client?http://localhost:${port}/`,
'webpack/hot/only-dev-server',
require.resolve('../app/backendWindow/index')
]
},

Expand Down
3 changes: 2 additions & 1 deletion configs/webpack.config.renderer.prod.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ export default merge.smart(baseConfig, {
target: 'electron-renderer',

entry: {
mainWindow: [path.join(__dirname, '..', 'app/mainWindow/index')]
mainWindow: [path.join(__dirname, '..', 'app/mainWindow/index')],
backendWindow: [path.join(__dirname, '..', 'app/backendWindow/index')]
},

output: {
Expand Down

0 comments on commit 78e3e74

Please sign in to comment.