Socket
Socket
Sign inDemoInstall

size-limit

Package Overview
Dependencies
36
Maintainers
1
Versions
174
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    size-limit

CLI tool for Size Limit


Version published
Weekly downloads
209K
decreased by-0.87%
Maintainers
1
Install size
823 kB
Created
Weekly downloads
 

Package description

What is size-limit?

Size Limit is a performance monitoring tool for JavaScript projects. It helps you keep your project within a specific size limit by analyzing the size of your JavaScript bundles and providing warnings when the size exceeds the specified limit.

What are size-limit's main functionalities?

Bundle Size Analysis

This feature allows you to specify the path to your JavaScript bundle and set a size limit. Size Limit will analyze the bundle and ensure it does not exceed the specified limit.

module.exports = [
  {
    path: 'dist/bundle.js',
    limit: '500 KB'
  }
];

Custom Configurations

You can customize the analysis by enabling gzip compression or disabling the running of the bundle. This provides more flexibility in how you measure the size of your bundles.

module.exports = [
  {
    path: 'dist/bundle.js',
    limit: '500 KB',
    gzip: true,
    running: false
  }
];

Multiple Bundles

Size Limit supports analyzing multiple bundles in a single configuration. This is useful for projects with multiple entry points or output files.

module.exports = [
  {
    path: 'dist/bundle1.js',
    limit: '300 KB'
  },
  {
    path: 'dist/bundle2.js',
    limit: '200 KB'
  }
];

Other packages similar to size-limit

Changelog

Source

6.0.3

  • Updated nanospinner.

Readme

Source

Size Limit CLI Tool

Core tool for Size Limit to load config and plugins.

See Size Limit docs for more details.

Sponsored by Evil Martians

Keywords

FAQs

Last updated on 12 Oct 2021

Did you know?

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc