Webpack plugin to copy, move, delete, archive (.zip/.tar/.tar.gz), and create directories before and after builds. Current stable version is 8.x (latest published as 10.0.1 but v7+ had alpha releases with breaking changes; v8 introduced new options). Requires Node >=22.14.0 and webpack ^5.0.0. Ships TypeScript definitions. Key differentiator: supports multiple file operations in a single plugin with glob patterns and flat copy options. Alternatives like copy-webpack-plugin only handle copying.
npm install filemanager-webpack-pluginVerified import paths — ran on the pinned version, not inferred.
Sets up the plugin to copy assets folder to dist and create a zip archive after build.
Add `options: { flat: true }` to your copy actions if you need flattened output.Explicitly set `options.flat` to `true` or `false` to control directory structure preservation.
Add `new webpack.WatchIgnorePlugin({ paths: [/copied-directory/] })` to your webpack config.Remove `runTasksInSeries` from options.
npm install filemanager-webpack-plugin --save-dev (ensure webpack is installed)
Use `const FileManagerPlugin = require('filemanager-webpack-plugin').default;`Use format: 'tar' with options: { gzip: true } instead.