{"id":21906,"library":"rollup-load-plugins","title":"rollup-load-plugins","description":"Utility to automatically load Rollup plugins listed in package.json, similar to gulp-load-plugins. Version 0.4.0 is the latest stable release, with slow development cadence. It reads dependencies, devDependencies, and peerDependencies matching a configurable pattern (default: rollup-plugin-*) and exposes them as camelCased properties on an object. Supports scoped packages, custom patterns, and configurable replacement strings. Unlike manual imports, it reduces boilerplate and enables dynamic plugin loading. No security incidents reported.","status":"active","version":"0.4.0","language":"javascript","source_language":"en","source_url":"https://github.com/timdp/rollup-load-plugins","tags":["javascript"],"install":[{"cmd":"npm install rollup-load-plugins","lang":"bash","label":"npm"},{"cmd":"yarn add rollup-load-plugins","lang":"bash","label":"yarn"},{"cmd":"pnpm add rollup-load-plugins","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package is ESM-only; CommonJS require may fail depending on Node version and module settings.","wrong":"const loadPlugins = require('rollup-load-plugins')","symbol":"loadPlugins","correct":"import loadPlugins from 'rollup-load-plugins'"},{"note":"The package exports a single function as default export, not a named export.","wrong":"import { loadPlugins } from 'rollup-load-plugins'","symbol":"default import","correct":"import loadPlugins from 'rollup-load-plugins'"},{"note":"Properties are camelCased by default; e.g., 'rollup-plugin-node-resolve' becomes 'plugins.nodeResolve'.","wrong":"","symbol":"plugins object usage","correct":"const plugins = loadPlugins(); plugins.rollupPluginSomething(...)"}],"quickstart":{"code":"import loadPlugins from 'rollup-load-plugins';\nimport { rollup } from 'rollup';\n\nconst plugins = loadPlugins();\n\nasync function build() {\n  const bundle = await rollup({\n    input: 'src/index.js',\n    plugins: [\n      plugins.nodeResolve({ jsnext: true, main: true }),\n      plugins.commonjs({ include: 'node_modules/**' })\n    ]\n  });\n  await bundle.write({ file: 'dist/bundle.js', format: 'cjs' });\n}\nbuild().catch(console.error);","lang":"javascript","description":"Loads all rollup-plugin-* packages from package.json and uses them in a Rollup build."},"warnings":[{"fix":"Use camelCase property names when accessing plugins.","message":"Plugin names are camelCased by default; e.g., rollup-plugin-node-resolve becomes plugins.nodeResolve.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Set maintainScope to false if you prefer plugins.foo.","message":"Scoped packages like @mycompany/rollup-plugin-foo become plugins.mycompany.foo by default if maintainScope is true.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Verify your plugin names match the pattern or adjust the pattern option.","message":"Only plugins matching the pattern (default: rollup-plugin-*) are loaded. Other dependencies are ignored.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Ensure all matching packages are valid Rollup plugins to avoid runtime errors.","message":"Plugins are required at load time, not lazily. All matching packages are imported immediately.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Install the missing plugin: npm install --save-dev rollup-plugin-<name>","cause":"The plugin is not installed or not listed in package.json under dependencies/devDependencies/peerDependencies.","error":"Cannot find module 'rollup-plugin-*'"},{"fix":"Check the exact property name by logging plugins or verifying pattern and replaceString options.","cause":"CamelCase transformation may produce unexpected property names or the plugin was not loaded.","error":"TypeError: plugins.nodeResolve is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}