A webpack plugin that automatically retries loading of async chunks that fail to load. Version 3.1.1 supports webpack 5 or newer. It is actively maintained, with regular updates. Key features include configurable retry delay, maximum retries, chunk filtering, cache busting, and a last resort script. It provides TypeScript type declarations and is a drop-in solution compared to manual retry logic.
npm install webpack-retry-chunk-load-pluginVerified import paths — ran on the pinned version, not inferred.
Shows how to require and instantiate the plugin in a webpack config with common options.
Upgrade to webpack 5 or stay on v1.x for webpack 4.
Use a string like `function() { return Date.now(); }` instead of just `Date.now()`.Ensure your chunk splitting is configured correctly for async chunks.
Pass a string like "window.location.href='/error'" instead of a function.
Run `npm install webpack-retry-chunk-load-plugin --save-dev`
Use `import { RetryChunkLoadPlugin } from 'webpack-retry-chunk-load-plugin'` or require with destructuring.Either upgrade to webpack 5 or use v1.x of the plugin.