📅 You're Invited: Meet the Socket team at RSAC (April 28 – May 1).RSVP
Socket
Sign inDemoInstall
Socket

@bundle-validator/plugin-bundle-size

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bundle-validator/plugin-bundle-size

A plugin for bundle-validator tool

1.0.0
Source
npm
Version published
Weekly downloads
1
-83.33%
Maintainers
2
Weekly downloads
 
Created
Source

@bundle-validator/plugin-bundle-size

Usage

  • Add plugin package as a devDependency:

    npm install @bundle-validator/plugin-bundle-size --save-dev
    

    or

    yarn add @bundle-validator/plugin-bundle-size --save-dev
    
  • Add this plugin to the plugins array of bundle-validator config:

    {
      "plugins": [["@bundle-validator/plugin-bundle-size", { "maxSize": "64KB" }]]
    }
    

Options

maxSize (required)

Threshold that the file's size must be less than or equal to in order to pass.

Format: number (in bytes) or string (that uses units specified here: https://www.npmjs.com/package/xbytes#unitstring)

Warning: lowercase b will be interpreted as bits, uppercase b will be interpreted as bytes ("10 Kb" will be seen as kilobits, "10 KB" is 10 kilobytes)

Examples:

"maxSize": "10KB" (SI units)

"maxSize": "10 KiB" (IEC units)

"maxSize": 10000 (10000 bytes)

FAQs

Package last updated on 14 Dec 2021

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