Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

retry-ensure-webpack-plugin

Package Overview
Dependencies
Maintainers
3
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

retry-ensure-webpack-plugin

Webpack plugin for retrying async chunk loading

  • 2.0.0-rc.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
386
decreased by-70.05%
Maintainers
3
Weekly downloads
 
Created
Source

Webpack plugin for retrying async chunk loading.

Retries internal __webpack__require__.e /* nsure */ function call on promise rejections.

Compatible with Webpack 4 and 5.

Usage

const RetryEnsureWebpackPlugin = require('retry-ensure-webpack-plugin').RetryEnsureWebpackPlugin;
/* ... */
plugins.push(new RetryEnsureWebpackPlugin(options));

Options

An optional parameter, object with properties.

max (number)

The max amount of retries. After that, Promise rejection is not handled by this plugin.

Note: This option is "max retries", not "max requests". In the worst case there would be 1 + max requests total.

If max equals 0, this plugin is turned off entirely.

Infinity is a valid value, if you want to retry until the end of time.

Default: 3.

delay (number | string)

  • number: Amount of milliseconds between retries, constant value.

  • string: Expression that returns a numeric value. A variable retriedTimes can be used for exponential (or whatever you like) backoff. retriedTimes equals 0 at the first retry attempt.

Note that this expression is not validated in any way. It's just plugged into your generated code.

Default: 'retriedTimes * retriedTimes * 1000'

FAQs

Package last updated on 23 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