{"id":21932,"library":"rollup-plugin-browserify-transform","title":"rollup-plugin-browserify-transform","description":"A Rollup plugin that lets you use any Browserify transform (e.g., brfs, coffeeify) within Rollup. Version 1.0.1 is stable but rarely updated; it bridges gaps where no equivalent Rollup plugin exists. Unlike manual transform replication, this plugin wraps Browserify transforms directly, accepting options like include/exclude patterns. It depends on Rollup's plugin system and the transform package itself. Use when migrating from Browserify to Rollup, but prefer native Rollup plugins for performance and compatibility.","status":"active","version":"1.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/lautis/rollup-plugin-browserify-transform","tags":["javascript","rollup-plugin","browserify"],"install":[{"cmd":"npm install rollup-plugin-browserify-transform","lang":"bash","label":"npm"},{"cmd":"yarn add rollup-plugin-browserify-transform","lang":"bash","label":"yarn"},{"cmd":"pnpm add rollup-plugin-browserify-transform","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency; requires Rollup >=0.25","package":"rollup","optional":false},{"reason":"used internally for include/exclude pattern matching","package":"minimatch","optional":false}],"imports":[{"note":"Default export, not named. CommonJS require works but is not recommended for ESM projects.","wrong":"const browserifyPlugin = require('rollup-plugin-browserify-transform')","symbol":"default (browserifyPlugin)","correct":"import browserifyPlugin from 'rollup-plugin-browserify-transform'"},{"note":"No named export exists; only default export. Use default import.","wrong":"const { browserifyPlugin } = require('rollup-plugin-browserify-transform')","symbol":"browserifyPlugin (with named import)","correct":"import { browserifyPlugin } from 'rollup-plugin-browserify-transform'"},{"note":"Pass the transform function directly, not a module path string.","wrong":"browserifyPlugin(require('brfs')); // works but ESM prefer imports","symbol":"transform function usage","correct":"import brfs from 'brfs';\nbrowserifyPlugin(brfs)"}],"quickstart":{"code":"// rollup.config.js (ESM)\nimport browserifyPlugin from 'rollup-plugin-browserify-transform';\nimport brfs from 'brfs';\n\nexport default {\n  input: 'src/index.js',\n  output: { file: 'dist/bundle.js', format: 'cjs' },\n  plugins: [\n    browserifyPlugin(brfs, { /* transform options */ }),\n  ],\n};","lang":"typescript","description":"Shows how to use the default export with a Browserify transform (brfs) in Rollup config."},"warnings":[{"fix":"Test transforms thoroughly; prefer native Rollup plugins when available.","message":"Browserify transforms may not work correctly with ES module syntax or Rollup's tree-shaking.","severity":"gotcha","affected_versions":">=1.0"},{"fix":"Upgrade Rollup to 0.25 or later.","message":"Breaking change: Rollup >=0.25 required; older versions not supported.","severity":"breaking","affected_versions":">=1.0"},{"fix":"Explicitly set include/exclude to narrow scope and avoid unnecessary transforms.","message":"The plugin ignores include/exclude options if not provided; defaults to all files.","severity":"gotcha","affected_versions":">=1.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run npm install --save-dev rollup-plugin-browserify-transform","cause":"Package not installed or incorrect import path.","error":"Error: Cannot find module 'rollup-plugin-browserify-transform'"},{"fix":"Use import browserifyPlugin from 'rollup-plugin-browserify-transform'","cause":"Named import when only default export exists.","error":"TypeError: browserifyPlugin is not a function"},{"fix":"Import the transform module and pass the function: import brfs from 'brfs'; browserifyPlugin(brfs)","cause":"Passed a module name string instead of the actual transform function.","error":"The transform function must be a function. Got undefined"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}