Retry loading chunks to make the app more resilient (#29001)
Will also fix some Playwright flakes Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
committed by
GitHub
parent
ef3bf59656
commit
03a1b48e1f
@@ -10,6 +10,7 @@ const CssMinimizerPlugin = require("css-minimizer-webpack-plugin");
|
||||
const HtmlWebpackInjectPreload = require("@principalstudio/html-webpack-inject-preload");
|
||||
const CopyWebpackPlugin = require("copy-webpack-plugin");
|
||||
const VersionFilePlugin = require("webpack-version-file-plugin");
|
||||
const { RetryChunkLoadPlugin } = require("webpack-retry-chunk-load-plugin");
|
||||
|
||||
// Environment variables
|
||||
// RIOT_OG_IMAGE_URL: specifies the URL to the image which should be used for the opengraph logo.
|
||||
@@ -690,6 +691,13 @@ module.exports = (env, argv) => {
|
||||
templateString: "<%= extras.VERSION %>",
|
||||
extras: { VERSION },
|
||||
}),
|
||||
|
||||
// Due to issues such as https://github.com/vector-im/element-web/issues/25277 we should retry chunk loading
|
||||
new RetryChunkLoadPlugin({
|
||||
cacheBust: `() => Date.now()`,
|
||||
retryDelay: 500,
|
||||
maxRetries: 3,
|
||||
}),
|
||||
].filter(Boolean),
|
||||
|
||||
output: {
|
||||
|
||||
Reference in New Issue
Block a user