Rollup plugin (v0.2.1) that automatically externalizes dependencies listed in package.json (dependencies, peerDependencies, and Node.js builtins). It simplifies the common task of excluding npm packages from the bundle, reducing bundle size and avoiding duplication. Most code is borrowed from rollup-plugin-auto-external but offers a slightly different API. Its defaults externalize builtins, dependencies, and peerDependencies. The last release was 0.2.0 with 0.2.1 as a patch. No known security issues. It integrates seamlessly with an existing Rollup external function.
npm install rollup-plugin-deps-externalVerified import paths — ran on the pinned version, not inferred.
Minimal Rollup config that automatically externalizes all dependencies, peerDependencies, and Node builtins.
Ensure your project is ESM ("type": "module" in package.json) or use a dynamic import.Use: import depsExternal from 'rollup-plugin-deps-external'
Pass options object, e.g., depsExternal({ peerDependencies: false }).Set packagePath: path.resolve('./path/to/package.json').Convert your config to ESM (use .mjs or "type": "module" in package.json) and use import.
Change import statement to: import depsExternal from 'rollup-plugin-deps-external'
Add the package to dependencies or peerDependencies, or use a different externalization strategy.
No dependency data recorded yet.