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

@plaudit/webpack-extensions

v3.20.1

Published

Readme

Plaudit Webpack Extensions

A webpack configuration and plugin suite designed specifically for WordPress development workflows. This package extends @wordpress/scripts with custom webpack plugins, PostCSS configurations, and build optimizations tailored for Plaudit's WordPress projects. It includes specialized handling for Gutenberg blocks, asset management, internationalization (WPML), and a same-origin CSS-inject / live-reload client for wp-scripts start.

Requirements

  • All block- and extension-related capabilities require that the plaudit/plaudit-common composer library be installed.
  • All assets must be under a unified root directory and must be emitted to a unified output directory
    • Ex: src/blocks and src/extensions emitting to dist/blocks and dist/extensions

Perks

Truly automatic asset loading

With the useUnifiedLoader flag enabled (see the usage example), this package will generate a single file that, when included, automatically registers and enqueues scripts, styles, and assets. This includes prefetching assets when the useWebpackResourceFiltering flag is enabled.

Automatic filename mapping in block.json

Instead of requiring developers to plug in the built names of files when developing blocks, this suite will automatically replace the source name with the built name in emitted block.json files and will automatically resolve filename conflicts that would otherwise cause the build to fail.

In addition to handling filename conflicts, it also automatically detects the presence of template.php and template.twig files and ensures that they are properly registered in the emitted block.json files.

Efficient loading

This suite generates loader code that uses the most efficient mechanisms available for registering assets, and, in the case of blocks in themes, a loading mechanism that is more efficient than any "available" method.

Unified Plugin and Theme Structures

The same file structure (both in the webpack.config.js file and the actual directory tree) can be used in plugins and themes.

Usage

Config, entry types, and handles: User Guide.

dist vs dist-dev

With the unified loader (site standard), outputDir is dist. When SERVER_MODE is development (the default if unset on the host) and omitDistDev is off, webpack writes dist-dev. WordPress in development loads that folder via dist/unified-loader.php when dist-dev/unified-loader.php exists. Production WordPress always uses dist.

SERVER_MODE chooses the folder. The compiler (mode, minify, webpack cache) is always production for dist. For dist-dev it follows NODE_ENV: wp-scripts start is development (no minify, cache on); wp-scripts build is production (minify, cache off) still written to dist-dev.

dev-reload.js / overlay run only for pnpm run dev (BROWSER_SYNC + watch) and only under dist-dev. Pass --no-dev-reload after -- (or DEV_RELOAD=0) to skip the overlay and live reload: pnpm run dev -- --no-dev-reload. Docker still starts and the browser still opens. The -- is required so webpack-cli does not treat the flag as an unknown option.

| Command | Folder | Compiler | Overlay | |-----------------------------------------|------------|------------------------------------------------------------------|---------| | pnpm run dev | dist-dev | development (no minify, cache on) | yes | | pnpm run dev -- --no-dev-reload | dist-dev | development (no minify, cache on) | no | | pnpm run watch | dist-dev | development (no minify, cache on) | no | | pnpm run build | dist-dev | production (minify, cache off) | no | | SERVER_MODE=production pnpm run build | dist | same production compiler as pnpm run build (minify, cache off) | no |

The last row is the same compile as a local build; only the folder changes. That is what ships: @plaudit/toolbox (toolbox init) installs a pre-commit hook that runs pnpm … build with SERVER_MODE=production and stages wp-content/**/dist/**. A plain pnpm run build on your machine does not update dist unless you set SERVER_MODE yourself. SKIP_BUILD=1 skips the hook build.

See Plaudit - Dev Webpack Plugin for more details

Development

Setup

pnpm install

Build

pnpm build

To Deploy

publish-pnpm-package