Registry / devops / rollup-plugin-concat

rollup-plugin-concat

JSON →
library1.0.4jsnpmunverified

A Rollup plugin that concatenates files into single output files during the buildStart hook, making them available for import by other plugins. Version 1.0.4 is stable but has no recent updates (last release likely pre-2020). Key differentiator: integrates directly into Rollup's build pipeline with grouped file configurations. Alternative to manual concatenation or separate build steps.

npm install rollup-plugin-concat
INSTALL
IMPORT
SIG · ROLLUP-PLUGIN-CONC
R
rollup-plugin-concat
devopsjavascriptv1.0.4
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18223 runs
build_error
glibc
node 18223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

concat
import concat from 'rollup-plugin-concat'
const concat = require('rollup-plugin-concat')
ESM-only; CommonJS require will fail unless project uses esModuleInterop.
default export
import concat from 'rollup-plugin-concat'
import { concat } from 'rollup-plugin-concat'
The plugin exports a default function only.

Configures rollup-plugin-concat to concatenate fileA.js and fileB.js into ab.js before bundling.

import concat from 'rollup-plugin-concat'; export default { input: 'src/index.js', output: { file: 'bundle.js', format: 'esm' }, plugins: [ concat({ groupedFiles: [ { files: ['./fileA.js', './fileB.js'], outputFile: './ab.js' } ] }) ] };
Debug
Known issues
gotchaPlugin only runs on buildStart hook; output files are generated before subsequent plugins run, but are not watched for changes.
fix
Ensure that concatenated files are static or trigger a rebuild manually if they change.
affects: >=1.0
gotchaOutput file paths are relative to the current working directory, not relative to the Rollup config file.
fix
Use absolute paths or resolve relative to __dirname.
affects: >=1.0
deprecatedThe package has not been updated in several years; may not work with Rollup 3+ due to hook changes.
fix
Consider using @rollup/plugin-multi-entry or manual concatenation scripts.
affects: >=2.0
Errors
Common errors & fixes
Error: Cannot find module 'rollup-plugin-concat'
Package not installed or import path incorrect.
fix
Run: npm install rollup-plugin-concat --save-dev
TypeError: concat is not a function
Imported as named export instead of default.
fix
Use: import concat from 'rollup-plugin-concat'
[!] (plugin concat) Error: groupedFiles must be an array
Options object missing groupedFiles or not an array.
fix
Provide options as { groupedFiles: [ {...} ] }
Upgrade
Version history
1.0.4latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
9 hits · last 30 days
node
8
Resources
rollup-plugin-concat — npm install rollup-plugin-concat · libregistry