Skip to content

christophernewton/webpack-auto-clean-build-plugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

webpack-auto-clean-build-plugin

Automatically remove old assets after each build in webpack watch mode

If you use webpack in watch mode (not dev server), and use hashes in your output file name, then your build folder will quickly rack up versions of every one of your output files.

This plugin makes it so that when a new chunk is generated with a different file name, the previous file name is auto removed.

This makes your project behave very closely to webpack-dev-server, but with writing files to disk, which is much friendlier when used with other web servers.

Does not handle initial clean

This plugin does not handle the initial clean. You should still use something like CleanWebpackPlugin for that.

Setup

var AutoCleanBuildPlugin = require('webpack-auto-clean-build-plugin');

then in

plugins: [ new AutoCleanBuildPlugin() ]

About

Automatically remove old assets after each build in webpack watch mode

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%