New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

webpack-del-plugin

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webpack-del-plugin

Webpack plugin for deleting files and folders.

latest
npmnpm
Version
0.0.2
Version published
Weekly downloads
3
-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

Description

webpack-del-plugin allow you manage files during compilation process. This plugin using del package.

Usege

  • Delete all files from dist folder before compiling bundle:

    const path = require('path');
    const WebpackDelPlugin = require('webpack-del-plugin');
    //...
    
    const ROOT_DIR = path.resolve(__dirname);
    const DIST_DIR = path.join(ROOT_DIR, 'dist');
    
    module.exports = {
    	// ...
    	plugins: [
    		// ...
    		new WebpackDelPlugin({match: path.join(DIST_DIR, '*.*')})
    	]
    };
    
  • Delete particular files:

    const path = require('path');
    const WebpackDelPlugin = require('webpack-del-plugin');
    //...
    
    const ROOT_DIR = path.resolve(__dirname);
    const DIST_DIR = path.join(ROOT_DIR, 'dist');
    
    module.exports = {
    	// ...
    	plugins: [
    		// ...
    		new WebpackDelPlugin({
    			match: [
    				path.join(DIST_DIR, 'file1.js'),
    				path.join(DIST_DIR, 'file2.js')
    			]
    		})
    	]
    };
    

Keywords

webpack-del-plugin

FAQs

Package last updated on 28 Aug 2017

Did you know?

Socket

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