chore: fix webpack reload

This commit is contained in:
Thomas Nordquist
2024-05-27 18:05:24 +02:00
parent 42565c8bdc
commit 28b99f5774
4 changed files with 50 additions and 258 deletions

View File

@@ -80,14 +80,14 @@
"node-loader": "^0.6.0",
"source-map-loader": "^0.2.4",
"style-loader": "^1",
"ts-loader": "^9.2.6",
"ts-loader": "^9.5.1",
"typescript": "^4.5.5",
"webpack": "^5.69.1",
"webpack": "^5.91.0",
"webpack-bundle-analyzer": "^4.5.0",
"webpack-cli": "^4.9.2",
"webpack-dev-server": "^4.7.4"
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^5.0.4"
},
"peerDependencies": {
"electron": "^29"
}
}
}

View File

@@ -41,6 +41,7 @@ module.exports = {
devServer: {
// contentBase: './dist', // content not from webpack
hot: true,
liveReload: true,
},
target: 'electron-renderer',
mode: 'production',
@@ -89,7 +90,6 @@ module.exports = {
plugins: [
new HtmlWebpackPlugin({ template: './index.html', file: './build/index.html', inject: false }),
// new BundleAnalyzerPlugin(),
new webpack.HotModuleReplacementPlugin(),
// new webpack.IgnorePlugin({
// resourceRegExp: /\.\/build\/Debug\/addon/,
// contextRegExp: /heapdump$/
@@ -107,4 +107,7 @@ module.exports = {
cache: {
type: 'filesystem',
},
optimization: {
runtimeChunk: 'single',
},
}

View File

@@ -4468,7 +4468,7 @@ tree-dump@^1.0.0:
resolved "https://registry.yarnpkg.com/tree-dump/-/tree-dump-1.0.1.tgz#b448758da7495580e6b7830d6b7834fca4c45b96"
integrity sha512-WCkcRBVPSlHHq1dc/px9iOfqklvzCbdRwvlNfxGZsrHqf6aZttfPrd7DJTt6oR10dwUfpFFQeVTkPbBIZxX/YA==
ts-loader@^9.2.6:
ts-loader@^9.5.1:
version "9.5.1"
resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-9.5.1.tgz#63d5912a86312f1fbe32cef0859fb8b2193d9b89"
integrity sha512-rNH3sK9kGZcH9dYzC7CewQm4NtxJTjSEVRJ2DyBZR7f8/wcta+iV44UPCXc5+nzDzivKtlzV6c9P4e+oFhDLYg==