automattic/jetpack-remove-asset-webpack-plugin 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

automattic/jetpack-remove-asset-webpack-plugin

Composer 安装命令:

composer require automattic/jetpack-remove-asset-webpack-plugin

包简介

A Webpack plugin to remove assets from the build.

README 文档

README

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 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

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

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

Usage

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

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

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

Need to report a security vulnerability? Go to https://automattic.com/security/ or directly to our security bug bounty site https://hackerone.com/automattic.

License

eslint-config-target-es is licensed under GNU General Public License v2 (or later)

统计信息

  • 总下载量: 31
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 3
  • Forks: 1
  • 开发语言: JavaScript

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2021-11-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固