PHPackages                             automattic/jetpack-remove-asset-webpack-plugin - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. automattic/jetpack-remove-asset-webpack-plugin

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

automattic/jetpack-remove-asset-webpack-plugin
==============================================

A Webpack plugin to remove assets from the build.

v1.0.36(1mo ago)4251GPL-2.0-or-laterJavaScriptCI failing

Since Nov 30Pushed 1mo ago3 watchersCompare

[ Source](https://github.com/Automattic/remove-asset-webpack-plugin)[ Packagist](https://packagist.org/packages/automattic/jetpack-remove-asset-webpack-plugin)[ RSS](/packages/automattic-jetpack-remove-asset-webpack-plugin/feed)WikiDiscussions trunk Synced 1mo ago

READMEChangelogDependencies (2)Versions (42)Used By (0)

remove-asset-webpack-plugin
===========================

[](#remove-asset-webpack-plugin)

A Webpack plugin to remove assets from the build.

This runs relatively late in the Webpack build, so derived assets may be included even if the parent asset is removed. This may be useful if you're using [static-site-generator-webpack-plugin](https://www.npmjs.com/package/static-site-generator-webpack-plugin) to build static HTML while building scripts another way, or if you're using Webpack to build SASS to CSS without any associated JS script.

Installation
------------

[](#installation)

Generally you'll install this via your package manager, e.g.

```
npm install --save-dev @automattic/remove-asset-webpack-plugin

```

Usage
-----

[](#usage)

This goes in the `plugins` section of your Webpack config, e.g.

```
{
	plugins: [
		new RemoveAssetWebpackPlugin( {
			assets: [
				'foo.js',
				'foo.js.map',
			],
		},
	],
};
```

### Parameters

[](#parameters)

- `assets`: This specifies the assets to remove from the output. The value may be a string, RegExp, Function, or an array of the same.
    - If a string, the string specifies the asset name to remove from the output.
    - If a RegExp, any asset name matching the regex is removed.
    - If a Function, any asset for which the function returns true is removed. The function is passed two parameters: the name of the asset, and the asset itself.

If you want to debug asset removal, set environment variable `DEBUG` to include `@automattic/remove-asset-webpack-plugin`.

Security
--------

[](#security)

Need to report a security vulnerability? Go to  or directly to our security bug bounty site .

License
-------

[](#license)

eslint-config-target-es is licensed under [GNU General Public License v2 (or later)](./LICENSE.txt)

###  Health Score

50

—

FairBetter than 95% of packages

Maintenance98

Actively maintained with recent releases

Popularity13

Limited adoption so far

Community25

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~41 days

Recently: every ~48 days

Total

39

Last Release

40d ago

Major Versions

v0.1.1 → v1.0.02021-12-22

### Community

Maintainers

![](https://www.gravatar.com/avatar/7c5869ecbb8e0eac7e8b8e0f3cf7bdd8d5fcdc4abc10a72281872c53f8639d44?d=identicon)[automattic](/maintainers/automattic)

![](https://www.gravatar.com/avatar/11609890f6e7a840715f4cfc9622d77ea64b7dfc024df5643fbf8471a18c00f3?d=identicon)[kraft](/maintainers/kraft)

![](https://www.gravatar.com/avatar/5326730499ec14e274f51b9bcc39db6aac0fb38b33849715aae0e2587a2b93df?d=identicon)[jeherve](/maintainers/jeherve)

![](https://www.gravatar.com/avatar/6e220e167e341c28b1aa10bf0bb0374999068329f8683d3187ee3cf6749b8837?d=identicon)[dereksmart](/maintainers/dereksmart)

---

Top Contributors

[![anomiex](https://avatars.githubusercontent.com/u/1030580?v=4)](https://github.com/anomiex "anomiex (98 commits)")[![tbradsha](https://avatars.githubusercontent.com/u/32492176?v=4)](https://github.com/tbradsha "tbradsha (26 commits)")[![samiff](https://avatars.githubusercontent.com/u/15803018?v=4)](https://github.com/samiff "samiff (11 commits)")[![jeherve](https://avatars.githubusercontent.com/u/426388?v=4)](https://github.com/jeherve "jeherve (8 commits)")[![zinigor](https://avatars.githubusercontent.com/u/374293?v=4)](https://github.com/zinigor "zinigor (8 commits)")[![sdixon194](https://avatars.githubusercontent.com/u/33553323?v=4)](https://github.com/sdixon194 "sdixon194 (6 commits)")[![gmjuhasz](https://avatars.githubusercontent.com/u/36671565?v=4)](https://github.com/gmjuhasz "gmjuhasz (6 commits)")[![coder-karen](https://avatars.githubusercontent.com/u/16754605?v=4)](https://github.com/coder-karen "coder-karen (6 commits)")[![kraftbj](https://avatars.githubusercontent.com/u/88897?v=4)](https://github.com/kraftbj "kraftbj (4 commits)")[![manzoorwanijk](https://avatars.githubusercontent.com/u/18226415?v=4)](https://github.com/manzoorwanijk "manzoorwanijk (4 commits)")[![ice9js](https://avatars.githubusercontent.com/u/8056203?v=4)](https://github.com/ice9js "ice9js (2 commits)")[![bindlegirl](https://avatars.githubusercontent.com/u/1242807?v=4)](https://github.com/bindlegirl "bindlegirl (2 commits)")[![gogdzl](https://avatars.githubusercontent.com/u/37049295?v=4)](https://github.com/gogdzl "gogdzl (2 commits)")[![dhasilva](https://avatars.githubusercontent.com/u/8486249?v=4)](https://github.com/dhasilva "dhasilva (1 commits)")[![adamwoodnz](https://avatars.githubusercontent.com/u/1017872?v=4)](https://github.com/adamwoodnz "adamwoodnz (1 commits)")[![adimoldovan](https://avatars.githubusercontent.com/u/3854374?v=4)](https://github.com/adimoldovan "adimoldovan (1 commits)")[![nunyvega](https://avatars.githubusercontent.com/u/16329583?v=4)](https://github.com/nunyvega "nunyvega (1 commits)")[![paulopmt1](https://avatars.githubusercontent.com/u/1044309?v=4)](https://github.com/paulopmt1 "paulopmt1 (1 commits)")[![psealock](https://avatars.githubusercontent.com/u/1922453?v=4)](https://github.com/psealock "psealock (1 commits)")[![grzegorz-cp](https://avatars.githubusercontent.com/u/112354940?v=4)](https://github.com/grzegorz-cp "grzegorz-cp (1 commits)")

### Embed Badge

![Health badge](/badges/automattic-jetpack-remove-asset-webpack-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/automattic-jetpack-remove-asset-webpack-plugin/health.svg)](https://phpackages.com/packages/automattic-jetpack-remove-asset-webpack-plugin)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
