All Projects → jackypan1989 → del-webpack-plugin

jackypan1989 / del-webpack-plugin

Licence: MIT license
A file plugin help you remove old files after webpack (v5) bundling

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to del-webpack-plugin

VsCacheCleaner
🧹 Clear the Visual Studio solution cache, free up your disk space!
Stars: ✭ 69 (+60.47%)
Mutual labels:  trash, cleaner
readability-cli
A CLI for Mozilla Readability. Get clean, uncluttered, ready-to-read HTML from any webpage!
Stars: ✭ 41 (-4.65%)
Mutual labels:  cleaner
Critters
🦔 A Webpack plugin to inline your critical CSS and lazy-load the rest.
Stars: ✭ 2,894 (+6630.23%)
Mutual labels:  webpack-plugin
wastebasket
A crossplatform go library for moving files to the trashbin
Stars: ✭ 30 (-30.23%)
Mutual labels:  trash
Webpack Messages
Beautifully format Webpack messages throughout your bundle lifecycle(s)!
Stars: ✭ 238 (+453.49%)
Mutual labels:  webpack-plugin
trash
Remove Command using a trash box.
Stars: ✭ 19 (-55.81%)
Mutual labels:  trash
Page Skeleton Webpack Plugin
Webpack plugin to generate the skeleton page automatically
Stars: ✭ 2,632 (+6020.93%)
Mutual labels:  webpack-plugin
XTR-Toolbox
🛠 Versatile tool to optimize Windows
Stars: ✭ 138 (+220.93%)
Mutual labels:  cleaner
asset-map-webpack-plugin
Webpack plugin that creates a map of assets to public url slug for server agnostic usage.
Stars: ✭ 14 (-67.44%)
Mutual labels:  webpack-plugin
webpack-extract-translation-keys
This plugin extracts translation keys for applications requiring runtime translations
Stars: ✭ 35 (-18.6%)
Mutual labels:  webpack-plugin
webpack-bugsnag-plugins
Webpack plugins for common Bugsnag actions.
Stars: ✭ 29 (-32.56%)
Mutual labels:  webpack-plugin
Webpack Shell Plugin
Run shell commands either before or after webpack builds
Stars: ✭ 250 (+481.4%)
Mutual labels:  webpack-plugin
webpack-omit-js-for-css-plugin
This plugin will omit bundled JS files for dependencies that are exclusively CSS, which become obsolete once mini-css-extract-plugin extracts inlined CSS into its own .css file
Stars: ✭ 14 (-67.44%)
Mutual labels:  webpack-plugin
Copy Webpack Plugin
Copy files and directories with webpack
Stars: ✭ 2,679 (+6130.23%)
Mutual labels:  webpack-plugin
pxtorem-webpack-plugin
A webpack plugin for generating rem for stylesheet and inject auto calculate scripts.
Stars: ✭ 24 (-44.19%)
Mutual labels:  webpack-plugin
Hard Source Webpack Plugin
www.npmjs.com/package/hard-source-webpack-plugin
Stars: ✭ 2,608 (+5965.12%)
Mutual labels:  webpack-plugin
removedupes
Remove Duplicate Messages
Stars: ✭ 52 (+20.93%)
Mutual labels:  cleaner
sitemap-webpack-plugin
Webpack plugin to generate a sitemap.
Stars: ✭ 72 (+67.44%)
Mutual labels:  webpack-plugin
detect-waste
AI to Combat Environmental Pollution - detecting plastic waste in the environment to combat environmental pollution and promote circular economy (Deep Learning, PyTorch)
Stars: ✭ 113 (+162.79%)
Mutual labels:  trash
image-minimizer-webpack-plugin
Webpack loader and plugin to compress images using imagemin
Stars: ✭ 180 (+318.6%)
Mutual labels:  webpack-plugin

Del-webpack-plugin

v2 was released, support webpack v5 !

A clean webpack plugin which can remove old files after bundling just as the well-known plugin clean-webpack-plugin, and more than it.

changelog

2021-04-01 (2.1.0): bump version, only use esbuild
2020-10-20 (2.0.0): rewrite to ts, rollup, and support webpack v5
2018-04-25 (1.0.5): upgrade to webpack v4
2018-05-28 (1.0.6): fix and update lib
2018-08-30 (1.1.0): add keepGeneratedAssets option
2018-10-18 (1.2.0): add allowExternal option

feature

  • webpack v5
  • typed source code
  • only delete after webpack compile
  • skip plugin if compile error
  • multiple entry / path support
  • include / exclude files support
  • verbose / mute info support
  • colorful log with chalk
  • example with webpack
  • support cross platform

install

# use yarn
yarn add -D del-webpack-plugin

# use npm
npm i -D del-webpack-plugin

usage (in your webpack config)

const DelWebpackPlugin = require('del-webpack-plugin')

{
  plugins: [
    new DelWebpackPlugin({
      include: ['**'],
      exclude: ['test.js'],
      info: true,
      keepGeneratedAssets: true,
      allowExternal: false
    })
  ]
}

options

field desc type default
info console.log added files and deleted files boolean true
keepGeneratedAssets keep webpack generated files boolean true
allowExternal allows del-webpack-plugin to delete files outside of webpack root folder boolean false
include a file list you wanna delete it will delete all files and folders by default, example: ['trash.js', 'trash/*.js'] string[] ['**']
exclude a file list you dont wanna delete, example: ['test.js', 'test/*.js'] string[] []

Welcome any issues and PRs submit :D

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].