npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

webpack-module-timing-plugin

v0.1.1

Published

Inspect webpack build bottlenecks with per-file timing reports and Vue SFC part breakdowns.

Readme

webpack-module-timing-plugin

npm version CI license

Find the slowest files in your webpack build.

webpack-module-timing-plugin gives you a terminal-first timing report that answers:

  • Which source files are expensive to compile?
  • Is the time going into module build, optimize, or emit?
  • In a Vue SFC, is the slowdown in template, script, or style?

It reports:

  • The slowest files in the current build
  • A phase summary for module build, optimize, and emit work
  • Vue SFC part timings for template, script, and style

Quick Start

npm install --save-dev webpack-module-timing-plugin
const WebpackModuleTimingPlugin = require('webpack-module-timing-plugin')

module.exports = {
  plugins: [
    new WebpackModuleTimingPlugin(),
  ],
}

At A Glance

  • File-level timing reports for webpack builds
  • Vue SFC timing breakdowns out of the box
  • Helpful for both initial builds and incremental rebuilds
  • Lightweight output that fits directly in the terminal

Why This Plugin

Many webpack performance tools focus on the whole build, individual loaders, or bundle size.

This plugin focuses on a different question:

Which source files are the slowest to compile right now?

That makes it useful when you are trying to:

  • Find a handful of expensive files in a large app
  • Understand whether a slow Vue file is heavy in template, script, or style
  • Compare first build and incremental rebuild hotspots
  • Give teammates a simple terminal report without extra dashboards

Features

  • Per-file timing ranking
  • Optional Vue SFC part breakdown
  • Build phase summary
  • Works with webpack 4 and webpack 5
  • Zero runtime dependencies

Install

npm install --save-dev webpack-module-timing-plugin

Repository

  • Homepage: https://github.com/EricBoum/webpack-module-timing-plugin
  • Issues: https://github.com/EricBoum/webpack-module-timing-plugin/issues

Usage

const WebpackModuleTimingPlugin = require('webpack-module-timing-plugin')

module.exports = {
  plugins: [
    new WebpackModuleTimingPlugin({
      topN: 20,
      filter: /[\\/]src[\\/]/,
      showParts: true,
      showEntries: false,
    }),
  ],
}

Common Use Cases

  • Investigating a suddenly slow local rebuild after a feature branch grows
  • Finding which Vue page or shared component is dominating compile time
  • Spot-checking whether a build slowdown comes from source transforms or later webpack phases
  • Sharing a low-friction build performance signal with the team during optimization work

What It Measures

  • Module build time, grouped by source file
  • A build phase summary using webpack compiler hooks
  • Vue SFC child module timings derived from vue-loader resource queries

What It Does Not Measure

  • Exact loader-by-loader timing
  • Bundle size or output chunk analysis
  • A perfect wall-clock profiler for every internal webpack step

The report is designed to be actionable and lightweight, not a full tracing system.

Options

| Option | Type | Default | Description | | --- | --- | --- | --- | | topN | number | 15 | Show the slowest N files. | | filter | RegExp \| (resource) => boolean | /[\\/]src[\\/]/ | Limit tracked files. | | showParts | boolean | true | Show per-part details below each file. | | showEntries | boolean | false | Show Vue entry aggregation rows without adding them to total time. | | barWidth | number | 24 | Width of the timing bars. | | context | string | process.cwd() | Base directory used for relative paths. | | colors | boolean | true | Enable ANSI colors in terminal output. | | writer | (report, payload) => void | console.log | Custom output hook. |

showAll is also accepted as a backward-compatible alias of showEntries.

Example Output

┌────────────────────────────────────────────────────────────────────────┐
│  Webpack Module Timing  [initial build]  total: 8.34s  files: 12
├────────────────────────────────────────────────────────────────────────┤
│  Build phases
│  module build          ██████████████        5.28s
│  seal / optimize       ███                   1.06s
│  emit                  ██                    612ms
├────────────────────────────────────────────────────────────────────────┤
│  rank  file                                                total
├────────────────────────────────────────────────────────────────────────┤
│  #1    src/pages/home/index.vue                           1.42s
│       ├── template  ██████████████                         673ms
│       ├── script    ███████                                411ms
│       └── style     ███                                    192ms
└────────────────────────────────────────────────────────────────────────┘

When To Use It

  • Your webpack build feels slow, but the normal output is too coarse
  • You want file-level timing without introducing a heavy profiling workflow
  • Your project uses Vue SFCs and you want to see whether the bottleneck lives in template, script, or style

Changelog

See CHANGELOG.md.

Release Checklist

Before publishing:

  1. Verify the package name is still available on npm.
  2. Bump version in package.json.
  3. Add CI for npm test.
  4. Publish with npm publish --access public.

License

MIT