A file management plugin for webpack, rollup, and Vite that supports delete, copy, move, rename, zip/unzip operations before and after builds. Current stable version is 2.9.0. It provides two event-driven APIs: a simple 'events' pattern for common build lifecycle hooks (start/end) and a more flexible 'customHooks' pattern that allows binding to arbitrary compiler hooks (e.g., webpack's compile, rollup's generateBundle). Supports .zip, .tar, .tar.gz archives. Unlike similar plugins (e.g., copy-webpack-plugin, webpack-archive-plugin), filemanager-plugin bundles multiple file operations in one plugin, includes rollup and Vite support. Release cadence is irregular; last update was in 2023. Requires Node >= 14, webpack >= 4.
npm install filemanager-pluginNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Configures filemanager-plugin in webpack to delete the dist folder before build and zip a file after build.
Use only one of events or customHooks per plugin instance.
Always specify type: 'zip' or 'tar' explicitly.
Use absolute paths or paths relative to process.cwd().
Use require() or enable interop in bundler (e.g., allowSyntheticDefaultImports).
Use const { WebpackFilemanager } = require('filemanager-plugin');Run npm install filemanager-plugin --save-dev and ensure it is in node_modules.
const { WebpackFilemanager } = require('filemanager-plugin');