Webpack plugin for concatenating and transforming files into bundles. Supports glob patterns, before/after transforms for operations like minification, and Webpack 5 optimization. Current version 0.5.2 (Feb 2021) supports Webpack 4 and 5. Differentiates from alternatives by integrating directly with Webpack's asset pipeline and watch mode. Uses 'bundles' config with src/dest arrays, separation string, and optional transforms. Deprecated old 'source'/'destination' options in favor of 'src'/'dest'.
npm install webpack-concat-files-pluginVerified import paths — ran on the pinned version, not inferred.
Basic setup concatenating multiple files with optional transform and configuration options.
Rename 'source' to 'src' and 'destination' to 'dest' in bundle config.
Upgrade to v0.5.2 or later.
Upgrade to v0.5.1+ or ensure src is a string.
Use glob patterns like './src/**/*.js' or an array of glob strings.
Ensure config object has 'bundles' as an array: new WebpackConcatPlugin({ bundles: [...] }).Replace 'source' with 'src' in bundle configuration.
Verify glob pattern and ensure files exist; use path.resolve for absolute paths.