Skip to content

Commit 20a3202

Browse files
Merge pull request #802 from thomasnordquist/tnordquist/fix-hot-reload
chore: fix webpack reload
2 parents 42565c8 + 28b99f5 commit 20a3202

File tree

4 files changed

+50
-258
lines changed

4 files changed

+50
-258
lines changed

app/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,14 @@
8080
"node-loader": "^0.6.0",
8181
"source-map-loader": "^0.2.4",
8282
"style-loader": "^1",
83-
"ts-loader": "^9.2.6",
83+
"ts-loader": "^9.5.1",
8484
"typescript": "^4.5.5",
85-
"webpack": "^5.69.1",
85+
"webpack": "^5.91.0",
8686
"webpack-bundle-analyzer": "^4.5.0",
87-
"webpack-cli": "^4.9.2",
88-
"webpack-dev-server": "^4.7.4"
87+
"webpack-cli": "^5.1.4",
88+
"webpack-dev-server": "^5.0.4"
8989
},
9090
"peerDependencies": {
9191
"electron": "^29"
9292
}
93-
}
93+
}

app/webpack.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ module.exports = {
4141
devServer: {
4242
// contentBase: './dist', // content not from webpack
4343
hot: true,
44+
liveReload: true,
4445
},
4546
target: 'electron-renderer',
4647
mode: 'production',
@@ -89,7 +90,6 @@ module.exports = {
8990
plugins: [
9091
new HtmlWebpackPlugin({ template: './index.html', file: './build/index.html', inject: false }),
9192
// new BundleAnalyzerPlugin(),
92-
new webpack.HotModuleReplacementPlugin(),
9393
// new webpack.IgnorePlugin({
9494
// resourceRegExp: /\.\/build\/Debug\/addon/,
9595
// contextRegExp: /heapdump$/
@@ -107,4 +107,7 @@ module.exports = {
107107
cache: {
108108
type: 'filesystem',
109109
},
110+
optimization: {
111+
runtimeChunk: 'single',
112+
},
110113
}

app/yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4468,7 +4468,7 @@ tree-dump@^1.0.0:
44684468
resolved "https://registry.yarnpkg.com/tree-dump/-/tree-dump-1.0.1.tgz#b448758da7495580e6b7830d6b7834fca4c45b96"
44694469
integrity sha512-WCkcRBVPSlHHq1dc/px9iOfqklvzCbdRwvlNfxGZsrHqf6aZttfPrd7DJTt6oR10dwUfpFFQeVTkPbBIZxX/YA==
44704470

4471-
ts-loader@^9.2.6:
4471+
ts-loader@^9.5.1:
44724472
version "9.5.1"
44734473
resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-9.5.1.tgz#63d5912a86312f1fbe32cef0859fb8b2193d9b89"
44744474
integrity sha512-rNH3sK9kGZcH9dYzC7CewQm4NtxJTjSEVRJ2DyBZR7f8/wcta+iV44UPCXc5+nzDzivKtlzV6c9P4e+oFhDLYg==

0 commit comments

Comments
 (0)