{"id":21923,"library":"rollup-plugin-auto-transform","title":"rollup-plugin-auto-transform","description":"An automatic transform plugin for Rollup that mimics Browserify's transform resolution by reading the `browserify.transform` key in package.json. As of version 1.0.2 (stable, single release), it simplifies applying Browserify transforms (e.g., brfs, envify) to Rollup bundles without manual configuration. Unlike manual plugin arrays, it reads transforms from package.json automatically, reducing setup duplication. No active development since 2017; considered feature-complete for its narrow use case. Alternative: use Rollup plugins directly or @rollup/plugin-commonjs for broader compatibility.","status":"maintenance","version":"1.0.2","language":"javascript","source_language":"en","source_url":"git@github.com:calvinmetcalf/rollup-plugin-auto-transform","tags":["javascript","rollup-plugin"],"install":[{"cmd":"npm install rollup-plugin-auto-transform","lang":"bash","label":"npm"},{"cmd":"yarn add rollup-plugin-auto-transform","lang":"bash","label":"yarn"},{"cmd":"pnpm add rollup-plugin-auto-transform","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency required by the plugin to function.","package":"rollup","optional":false}],"imports":[{"note":"The package exports a single function as default. Named export is incorrect.","wrong":"const { autoTransform } = require('rollup-plugin-auto-transform')","symbol":"default","correct":"import autoTransform from 'rollup-plugin-auto-transform'"},{"note":"Only default export exists; named import will be undefined.","wrong":"import { autoTransform } from 'rollup-plugin-auto-transform'","symbol":"autoTransform (named import attempt)","correct":"import autoTransform from 'rollup-plugin-auto-transform'"},{"note":"In CJS, require returns the default export directly.","wrong":"const { default: autoTransform } = require('rollup-plugin-auto-transform')","symbol":"CommonJS require","correct":"const autoTransform = require('rollup-plugin-auto-transform')"},{"note":"No type definitions are bundled; use @types or inline type if needed.","wrong":null,"symbol":"TypeScript import","correct":"import autoTransform from 'rollup-plugin-auto-transform'"}],"quickstart":{"code":"import autoTransform from 'rollup-plugin-auto-transform';\nimport { rollup } from 'rollup';\n\nconst bundle = await rollup({\n  input: 'src/index.js',\n  plugins: [\n    autoTransform()\n  ]\n});\n\nconst { output } = await bundle.generate({ format: 'esm' });\nconsole.log(output[0].code);","lang":"javascript","description":"Shows how to use the plugin to automatically apply Browserify transforms defined in package.json to a Rollup bundle."},"warnings":[{"fix":"Consider using direct Rollup plugins (e.g., @rollup/plugin-commonjs, rollup-plugin-babel) or @rollup/plugin-node-resolve for better compatibility.","message":"Package is no longer actively maintained; last release in 2017.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Ensure your package.json has a 'browserify.transform' array. Example: { \"browserify\": { \"transform\": [\"brfs\"] } }","message":"Transforms must be listed under 'browserify.transform' in package.json; other keys are ignored.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Review each transform's compatibility with Rollup. Some Browserify transforms rely on Node.js streams or other Browserify internals.","message":"Transforms are applied globally, not per-file; may cause unexpected behavior with non-Browserify transforms.","severity":"gotcha","affected_versions":">=1.0.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 rollup-plugin-auto-transform` and ensure import is correct: `import autoTransform from 'rollup-plugin-auto-transform'`","cause":"Package not installed or import path incorrect.","error":"Cannot find module 'rollup-plugin-auto-transform'"},{"fix":"Use default import: `import autoTransform from 'rollup-plugin-auto-transform'` instead of `import { autoTransform } from...`","cause":"Using named import instead of default import.","error":"TypeError: autoTransform is not a function"},{"fix":"Install the transform package (e.g., `npm install brfs`) or remove it from 'browserify.transform'.","cause":"Transform package not installed but listed in package.json.","error":"Error: Could not resolve 'your-transform' from .../"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}