Registry / serialization / alp-rollup-plugin-config

alp-rollup-plugin-config

JSON →
library4.0.2jsnpmunverified

Rollup plugin to transform YAML configuration files using copy and YAML transform during the build process. v4.0.2 requires Node >=22.18.0, supports Rollup 2, 3, and 4, and includes full TypeScript type definitions. It is part of the alp ecosystem but can be used standalone. The plugin copies YAML files and optionally applies transformations, enabling dynamic config injection in Rollup bundles.

npm install alp-rollup-plugin-config
INSTALL
IMPORT
SIG · ALP-ROLLUP-PLUGIN-
A
alp-rollup-plugin-config
serializationjavascriptv4.0.2
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.

default
import alpRollupPluginConfig from 'alp-rollup-plugin-config'
const alpRollupPluginConfig = require('alp-rollup-plugin-config')
ESM-only package; CommonJS require will fail.
alpRollupPluginConfig
import { alpRollupPluginConfig } from 'alp-rollup-plugin-config'
Named export also available; both default and named export refer to same function.
PluginOptions
import type { PluginOptions } from 'alp-rollup-plugin-config'
const { PluginOptions } = require('alp-rollup-plugin-config')
TypeScript type import only. Use `import type` for types to avoid runtime errors.

Shows how to use alp-rollup-plugin-config in a Rollup config to copy and transform YAML files during build.

import configPlugin from 'alp-rollup-plugin-config'; import { defineConfig } from 'rollup'; export default defineConfig({ input: 'src/index.js', plugins: [ configPlugin({ files: ['config.yaml', 'config.prod.yaml'], transform: (content) => { const d = JSON.parse(content); d.appVersion = process.env.APP_VERSION ?? 'dev'; return JSON.stringify(d); }, copy: true }) ], output: { dir: 'dist', format: 'esm' } });
Debug
Known issues
breakingv4.0.0 drops support for Node <22.18.0 and Rollup <2.
fix
Upgrade Node to >=22.18.0 and Rollup to >=2.
affects: >=4.0.0
deprecatedv3.x series is no longer maintained; upgrade to v4.
fix
Update to ^4.0.0 and adjust Node version.
affects: >=3.0.0 <4.0.0
gotchaPlugin must be used in Rollup's transform hook context; ensure config files are in the correct location relative to the working directory.
fix
Use absolute paths or ensure relative paths resolve from the project root.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Plugin 'alp-rollup-plugin-config' requires a peer of rollup@^2.64.0 || ^3.0.0 || ^4.0.0 but none is installed.
Missing Rollup peer dependency.
fix
Run npm install rollup --save-dev to install Rollup.
TypeError: alpRollupPluginConfig is not a function
Using CommonJS require with ESM-only package.
fix
Change to ES module import syntax: import configPlugin from 'alp-rollup-plugin-config'.
Error: Node version 18.0.0 is not supported. Please use Node >=22.18.0.
Node version too low for v4.x.
fix
Upgrade Node to >=22.18.0.
Upgrade
Version history
4.0.2latest on npm
Audit
Dependencies
rolluprequiredpeer dependency required for plugin functionality
Agent activity
42 hits · last 30 days
node
40
OpenAI (training)
1
Resources
alp-rollup-plugin-config — npm install alp-rollup-plugin-config · libregistry