Socket
Socket
Sign inDemoInstall

esbuild-clean-plugin

Package Overview
Dependencies
45
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    esbuild-clean-plugin

An esbuild plugin to clean your build folder.


Version published
Maintainers
1
Install size
827 kB
Created

Readme

Source

esbuild-clean-plugin

npm build

An esbuild plugin to clean your build folder.

Installation

npm install esbuild-clean-plugin

Requirements

  • Node 14.15.0 (LTS) or later.
  • esbuild 0.11.18 or later.

Usage

import { build } from 'esbuild';
import { cleanPlugin } from 'esbuild-plugin-clean';

build({
  bundle: true,
  entryPoints: [path.resolve(__dirname, 'index.js')],
  metafile: true,
  outdir: path.resolve(__dirname, 'dist'),
  watch: true,
  plugins: [cleanPlugin({
      // Plugin options
  })],
});

Note: The metafile and outdir options must be set for the plugin to have any effect.

Options

  • dry (default false) - Run the plugin in dry mode, not deleting anything. Most useful together with the verbose option to see what would have been deleted.
  • initialCleanPatterns (default ['**/*']) - File patterns to remove on plugin setup, useful to clean the build directory before creating new files. Pass an empty array to disable it.
  • verbose (default false) - Print all files that have been deleted after each run.

Keywords

FAQs

Last updated on 15 May 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc