{"id":20821,"library":"webpack-retry-chunk-load-plugin","title":"webpack-retry-chunk-load-plugin","description":"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.","status":"active","version":"3.1.1","language":"javascript","source_language":"en","source_url":"https://github.com/mattlewis92/webpack-retry-chunk-load-plugin","tags":["javascript","webpack","webpack plugin","typescript"],"install":[{"cmd":"npm install webpack-retry-chunk-load-plugin","lang":"bash","label":"npm"},{"cmd":"yarn add webpack-retry-chunk-load-plugin","lang":"bash","label":"yarn"},{"cmd":"pnpm add webpack-retry-chunk-load-plugin","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Webpack 5+ is required as a peer dependency for plugin integration.","package":"webpack","optional":false}],"imports":[{"note":"Named import is correct; the plugin is exported as a named member. CommonJS require works if not using ESM.","wrong":"const RetryChunkLoadPlugin = require('webpack-retry-chunk-load-plugin')","symbol":"RetryChunkLoadPlugin","correct":"import { RetryChunkLoadPlugin } from 'webpack-retry-chunk-load-plugin'"}],"quickstart":{"code":"const { RetryChunkLoadPlugin } = require('webpack-retry-chunk-load-plugin');\n\nmodule.exports = {\n  plugins: [\n    new RetryChunkLoadPlugin({\n      maxRetries: 3,\n      retryDelay: 1000,\n      cacheBust: `function() { return Date.now(); }`,\n      lastResortScript: \"window.location.href='/500.html';\",\n    }),\n  ],\n};","lang":"javascript","description":"Shows how to require and instantiate the plugin in a webpack config with common options."},"warnings":[{"fix":"Upgrade to webpack 5 or stay on v1.x for webpack 4.","message":"Version 2.0.0 dropped webpack 4 support; only webpack 5+ is compatible.","severity":"breaking","affected_versions":">=2.0.0 <3.0.0"},{"fix":"Use a string like `function() { return Date.now(); }` instead of just `Date.now()`.","message":"The cacheBust option must be a stringified function expression, not a plain string.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Ensure your chunk splitting is configured correctly for async chunks.","message":"The plugin only retries loading of chunks that failed; it does not affect initial bundle loading.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Pass a string like \"window.location.href='/error'\" instead of a function.","message":"The lastResortScript option must be a string of JavaScript code, not a function reference.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'3.1.1':22 '5':25 'activ':30 'async':15 'automat':11 'bust':46 'cach':45 'chunk':4,16,43 'compar':64 'configur':38 'declar':56 'delay':40 'drop':61 'drop-in':60 'fail':18 'featur':36 'filter':44 'includ':37 'javascript':69 'key':35 'last':49 'load':5,13,20 'logic':68 'maintain':31 'manual':66 'maximum':41 'newer':27 'plugin':6,9,72 'provid':53 'regular':33 'resort':50 'retri':3,12,39,42,67 'script':51 'solut':63 'support':23 'type':55 'typescript':54,73 'updat':34 'version':21 'webpack':2,8,24,70,71 'webpack-retry-chunk-load-plugin':1","created_at":"2026-04-25T11:25:09.194183+00:00","updated_at":"2026-04-25T11:25:09.194183+00:00","problems":[{"fix":"Run `npm install webpack-retry-chunk-load-plugin --save-dev`","cause":"Package not installed or missing from node_modules.","error":"Cannot find module 'webpack-retry-chunk-load-plugin'"},{"fix":"Use `import { RetryChunkLoadPlugin } from 'webpack-retry-chunk-load-plugin'` or require with destructuring.","cause":"Default import used incorrectly; plugin is a named export.","error":"TypeError: RetryChunkLoadPlugin is not a constructor"},{"fix":"Either upgrade to webpack 5 or use v1.x of the plugin.","cause":"Using v2+ of the plugin with webpack 4.","error":"Error: webpack version 4.x is not supported"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/mattlewis92/webpack-retry-chunk-load-plugin","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/webpack-retry-chunk-load-plugin","openapi_spec":null,"status_page":null,"smithery":null,"categories":["web-framework"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-07-24","install_tag":null}}