🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

webpack-clean-obsolete-chunks

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webpack-clean-obsolete-chunks

A webpack plugin to remove obsolete chunk files in webpack watch mode

0.4.0
latest
Source
npm
Version published
Weekly downloads
5.3K
0.77%
Maintainers
2
Weekly downloads
 
Created
Source

webpack-clean-obsolete-chunks

npm version Coverage Status Build Status dependencies devDependencies Code Climate

A webpack plugin to remove obsolete chunk files in webpack watch mode. Especially useful when use hashes in output file names.

Installation

Via yarn:

yarn add webpack-clean-obsolete-chunks --dev

or via npm:

npm install webpack-clean-obsolete-chunks --save-dev

Usage

Just add this plugin as usual.

// webpack.config.js
var CleanObsoleteChunks = require('webpack-clean-obsolete-chunks');

module.exports = {
    // ...
    plugins: [
        new CleanObsoleteChunks(options)
    ]
    // ...
};

Options

{
  // Write logs to console.
  // Default: true
  verbose: true,

  // Clean obsolete chunks of webpack child compilations.
  // Default: false
  deep: true
}

NOTE: {deep: true} option will work only if all descendent compilations of the initial compilation have unique names

How it works

Plugin searches for all updated chunks and deletes obsolete files in output directory after each webpack compilation.

Support

We currently support Node.js of version ^6, ^7, ^8 and Webpack of version ^2, ^3, or ^4 (but ^1 should work also).

Contribution

You're free to contribute to this project by submitting issues and/or pull requests. Please be sure to read the contribution guidelines before making changes for a pull request.

License

This project is licensed under MIT.

Keywords

webpack

FAQs

Package last updated on 02 Apr 2018

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