You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

next-size

Package Overview
Dependencies
1
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

next-size

**Next-size** is a next.js plugin to **print browser assets sizes** when running `next build`.


Version published
Maintainers
1
Created

Readme

Source

next-size

Next-size is a next.js plugin to print browser assets sizes when running next build.

browser assets sizes appear magically when running next build ✨

🎁 Check out the example folder folder if you want to try next-size (the example includes css and dynamic imports).

Installation

yarn add next-size --dev

Usage

Edit your next configuration and wrap you config with withSize.

// next.config.js
const withSize = require('next-size')

module.exports = withSize()

The size of the assets created will be showed when you run next-build

Options

You can specify printRawSize to print raw asset sizes instead of gzipped sizes.

// next.config.js
const withSize = require('next-size')

module.exports = withSize({
  size: {
    printRawSize: true
  }
})

More

Inspired by :

FAQs

Package last updated on 25 Oct 2019

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc