New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

performance-loader

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

performance-loader

performance-loader for webpack

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

performance-loader

Wraps modules in the browser performance API.

installation

npm install performance-loader --save-dev

Usage

Documentation: Using loaders

Example config

module.exports = {
  module: {
    loaders: [
      { loader: "performance-loader" },
    ]
  }
};

In browser

After initializing the page in a browser try:

console.table(
    window.performance.getEntriesByType('measure')
        .filter(p => p.duration > 1) // only modules that took longer than 1ms
        .sort((a, b) => b.duration - a.duration) // sort by descending duration
        .map(p => [p.name, p.duration]) // map for the table
)
// table of modules that took longer than 1ms to run

Keywords

webpack

FAQs

Package last updated on 20 Jul 2016

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