New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

webpack-retry-chunk-load-plugin

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webpack-retry-chunk-load-plugin

A webpack plugin to retry loading of chunks that failed to load

  • 3.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is webpack-retry-chunk-load-plugin?

The webpack-retry-chunk-load-plugin is a plugin for Webpack that allows you to retry loading chunks that fail to load. This can be particularly useful in scenarios where network issues or other transient problems might cause chunk loading to fail.

What are webpack-retry-chunk-load-plugin's main functionalities?

Retrying Failed Chunk Loads

This feature allows you to configure the plugin to retry loading a chunk if it fails. The `retryDelay` option specifies the delay between retries in milliseconds, and the `maxRetries` option specifies the maximum number of retry attempts.

const RetryChunkLoadPlugin = require('webpack-retry-chunk-load-plugin');

module.exports = {
  plugins: [
    new RetryChunkLoadPlugin({
      retryDelay: 1000,
      maxRetries: 3,
    }),
  ],
};

Custom Retry Logic

This feature allows you to specify custom logic to be executed if all retry attempts fail. In this example, the `lastResortScript` option is used to reload the page if the chunk still fails to load after the maximum number of retries.

const RetryChunkLoadPlugin = require('webpack-retry-chunk-load-plugin');

module.exports = {
  plugins: [
    new RetryChunkLoadPlugin({
      retryDelay: 1000,
      maxRetries: 3,
      lastResortScript: 'window.location.reload()'
    }),
  ],
};
0

Keywords

FAQs

Package last updated on 20 May 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc