Socket
Book a DemoInstallSign in
Socket

webpack-cleanup-plugin-morinted

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webpack-cleanup-plugin-morinted

Fork of webpack-cleanup-plugin.

latest
Source
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

webpack-cleanup-plugin

This webpack plugin cleans up the extraneous files from the webpack's output path.

Since it runs when the compile process is finished, it is useful when you build on production and you want to remove the assets generated by a previous build.

npm install webpack-cleanup-plugin --save-dev

Beware! This plugins actually delete files. Make sure it's safe for your app to delete files not generated by webpack. Use the exclude option if you want to keep files that are not webpack assets.

Usage

Add the plugin to the plugins array in your webpack's config, e.g.:

{
  output: {
    path: "/my/output/path"
  },
  plugins: [
    // Remove all the files from /my/output/path that are not generated by the
    // the current instance of the webpack compiler
    new WebpackCleanupPlugin()
  ]
}

If you want to keep some files, e.g. a stats.json file generated from some other plugins, use the exclude option:

plugins: [
  // Remove all but stats.json and important.json
  new WebpackCleanupPlugin({
    exclude: ["stats.json", "important.js"]
  })
]

Keywords

webpack

FAQs

Package last updated on 04 Feb 2016

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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.