Clean Pack
Clear a directory prior to building the bundle.
Clean Pack
uses clean-webpack-plugin
to clear a directory before building. It is advised to clear the
webpack output directory prior building to get rid of old files.
Setup
npm install --save-dev @packmule/clean-pack
API
CleanPack()
Options
-
root - Defines the
root
option ofclean-webpack-plugin
. -
debug - Controls the
verbose
option ofclean-webpack-plugin
.
Usage
Example
Clears the contents of the webpack output
directory prior building.
import Packmule from '@packmule/core';
import CleanPack from '@packmule/clean-pack';
const packmule = new Packmule();
packmule.register(new CleanPack());
return packmule.generate();