Unified plugin system for multiple bundlers (Rollup, Vite, Webpack, esbuild) using a common plugin API based on Rollup's hook model. Current stable version 1.1.4. Allows writing one plugin that works across bundlers with bundler-specific adapters. Key differentiator: developers maintain one codebase instead of separate plugins per tool. Ships TypeScript types. Peer dependencies include specific versions of each bundler. Release cadence is irregular; last update August 2022. Note: esbuild requires proxyEsbuild wrapper; Webpack must avoid thread-loader; Rollup disallows as output plugin.
npm install compluginNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a simple transform plugin that prepends a prefix to JS files, then uses it in Rollup.
Remove thread-loader from webpack configuration or avoid using it with complugin plugins.
Place the plugin in the plugins array of the input options, not in output.plugins.
const esbuild = proxyEsbuild(require('esbuild')); esbuild.build({ plugins: [...] })Always call the appropriate method: myPlugin.vite(options) or myPlugin(options).vite
Import and call proxyEsbuild: import { proxyEsbuild } from 'complugin'; const esbuild = proxyEsbuild(originalEsbuild); esbuild.build({ plugins: [...] })Use named import of the exported function and call it with options: import myPlugin from './my-plugin'; myPlugin.vite({...})Remove thread-loader from webpack configuration.