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-internalVerified import paths — ran on the pinned version, not inferred.
Shows basic usage: import the plugin, pass an array of module names to keep internal.
Always place internal() as the final plugin in the rollup config plugins array.
Ensure modules are resolvable by your bundle (e.g., use rollup-plugin-node-resolve).
Consider migrating to Rollup's built-in 'output.inlineDynamicImports' or custom resolveId hooks.
Run 'npm install rollup-plugin-internal --save-dev' or 'yarn add -D rollup-plugin-internal'.
Change to 'import internal from 'rollup-plugin-internal''.
Provide an array with at least one module name, e.g., internal(['react']).