mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 09:42:07 +08:00
DEV: Introduce webpack-retry-chunk-load-plugin (#28960)
In our test suite, we sometimes see ChunkLoadErrors. This plugin should cause those failed requests to be retried seamlessly. It'll also help clients with flaky internet connections in production.
This commit is contained in:
parent
c6c4e09ba3
commit
aa9c59a24b
|
@ -13,6 +13,7 @@ const DeprecationSilencer = require("deprecation-silencer");
|
|||
const { compatBuild } = require("@embroider/compat");
|
||||
const { Webpack } = require("@embroider/webpack");
|
||||
const { StatsWriterPlugin } = require("webpack-stats-plugin");
|
||||
const { RetryChunkLoadPlugin } = require("webpack-retry-chunk-load-plugin");
|
||||
const withSideWatch = require("./lib/with-side-watch");
|
||||
const RawHandlebarsCompiler = require("discourse-hbr/raw-handlebars-compiler");
|
||||
const crypto = require("crypto");
|
||||
|
@ -223,6 +224,11 @@ module.exports = function (defaults) {
|
|||
return JSON.stringify(output, null, 2);
|
||||
},
|
||||
}),
|
||||
new RetryChunkLoadPlugin({
|
||||
retryDelay: 200,
|
||||
maxRetries: 2,
|
||||
chunks: ["assets/discourse.js"],
|
||||
}),
|
||||
],
|
||||
},
|
||||
},
|
||||
|
|
|
@ -125,6 +125,7 @@
|
|||
"util": "^0.12.5",
|
||||
"virtual-dom": "^2.1.1",
|
||||
"webpack": "^5.94.0",
|
||||
"webpack-retry-chunk-load-plugin": "^3.1.1",
|
||||
"webpack-stats-plugin": "^1.1.3",
|
||||
"xss": "^1.0.15"
|
||||
},
|
||||
|
|
1006
pnpm-lock.yaml
1006
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user