Registry / devops / rollup-plugin-internal

rollup-plugin-internal

JSON →
library1.0.4jsnpmunverified

Rollup plugin (v1.0.4) that forces specified dependencies to be treated as internal, preventing Rollup from externalizing them. Useful when bundling libraries that re-export certain peer dependencies. Minimal configuration: just pass an array of module names. Works with Rollup >=0.45.2. Alternative to manual external() or other deduplication plugins.

npm install rollup-plugin-internal
INSTALL
IMPORT
SIG · ROLLUP-PLUGIN-INTE
R
rollup-plugin-internal
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.

default import
import internal from 'rollup-plugin-internal'
const internal = require('rollup-plugin-internal')
The package exports a default function; CommonJS require works as well but TypeScript may need esModuleInterop for default import.
Named import (incorrect)
import internal from 'rollup-plugin-internal'
import { internal } from 'rollup-plugin-internal'
There is no named export 'internal'; always use default import.

Shows basic usage: import the plugin, pass an array of module names to keep internal.

// rollup.config.js import internal from 'rollup-plugin-internal'; export default { input: 'src/index.js', output: { file: 'dist/bundle.js', format: 'es' }, plugins: [ internal(['lodash', 'moment']) ] };
Debug
Known issues
gotchaThe plugin must be listed last in the plugins array to ensure it correctly overrides externalization done by other plugins.
fix
Always place internal() as the final plugin in the rollup config plugins array.
affects: >=0.0.0
gotchaSpecified modules are marked as internal but not bundled automatically; other plugins (like node-resolve) must still resolve them.
fix
Ensure modules are resolvable by your bundle (e.g., use rollup-plugin-node-resolve).
affects: >=0.0.0
deprecatedThe package has not been updated since 2018 and may not work with newer Rollup versions (>2.x) due to plugin API changes.
fix
Consider migrating to Rollup's built-in 'output.inlineDynamicImports' or custom resolveId hooks.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'rollup-plugin-internal'
Package not installed or missing from node_modules.
fix
Run 'npm install rollup-plugin-internal --save-dev' or 'yarn add -D rollup-plugin-internal'.
TypeError: Object(...) is not a function
Using named import { internal } instead of default import.
fix
Change to 'import internal from 'rollup-plugin-internal''.
(!) Plugin internal: Specified modules are empty array (nothing to mark internal)
Passed empty array or no arguments to the plugin.
fix
Provide an array with at least one module name, e.g., internal(['react']).
Upgrade
Version history
1.0.4latest on npm
Audit
Dependencies
rolluprequiredpeer dependency required for plugin integration
Agent activity
7 hits · last 30 days
node
6
Resources
rollup-plugin-internal — npm install rollup-plugin-internal · libregistry