{"id":22014,"library":"rollup-plugin-executable-output","title":"rollup-plugin-executable-output","description":"Rollup plugin (v1.3.0, stable) that applies chmod 755 to output files, making them executable. Designed to work alongside rollup-plugin-preserve-shebang for CLI scripts. Unlike older plugins like rollup-plugin-chmod, it correctly handles multiple outputs per bundle and uses Rollup's generateBundle hook. Minimal dependencies; requires Rollup >=1.0.0. Release cadence is low; last update 2022. Key differentiator: no bugs when used with multiple outputs or code splitting.","status":"active","version":"1.3.0","language":"javascript","source_language":"en","source_url":"https://github.com/TeleworkInc/rollup-plugin-executable-output","tags":["javascript"],"install":[{"cmd":"npm install rollup-plugin-executable-output","lang":"bash","label":"npm"},{"cmd":"yarn add rollup-plugin-executable-output","lang":"bash","label":"yarn"},{"cmd":"pnpm add rollup-plugin-executable-output","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM-only; no CommonJS export. Use import syntax.","wrong":"const executable = require('rollup-plugin-executable-output')","symbol":"default","correct":"import executable from 'rollup-plugin-executable-output'"},{"note":"Default export is the plugin function; no named export.","symbol":"executable","correct":"import executable from 'rollup-plugin-executable-output'"},{"note":"Package does not ship TypeScript definitions; may need custom module declaration.","symbol":"TypeScript usage","correct":"// No types included; use @types/rollup or declare module"}],"quickstart":{"code":"// rollup.config.js\nimport executable from 'rollup-plugin-executable-output';\nimport shebang from 'rollup-plugin-preserve-shebang';\n\nexport default {\n  input: 'src/cli.js',\n  output: {\n    file: 'dist/cli.js',\n    format: 'cjs',\n  },\n  plugins: [shebang(), executable()],\n};","lang":"javascript","description":"Minimal Rollup config making a CLI bundle executable, with shebang preservation."},"warnings":[{"fix":"Use a dedicated chmod utility or post-build script for external files.","message":"Plugin only applies chmod 755 to outputs generated by Rollup; it does not handle files copied by other plugins (e.g., rollup-plugin-copy).","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Order plugins so executable() is last among those that modify output.","message":"The plugin must be placed after other output-modifying plugins (e.g., shebang) in the plugins array to ensure the final output is made executable.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use only 'output.file' or consider 'rollup-plugin-chmod' for directories.","message":"Does not work with Rollup's 'output.dir' option for multiple chunks; only intended for single-file outputs via 'output.file'.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Pin Rollup to version 3 or test compatibility.","message":"No active development; last update 2022. May not support Rollup 4+ hooks if they change.","severity":"deprecated","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":"Use Rollup 3.x or switch to 'rollup-plugin-chmod' which may have been updated.","cause":"Rollup 4 deprecated the 'generateBundle' hook signature used by older versions.","error":"Error: The plugin 'rollup-plugin-executable-output' is not compatible with Rollup 4. Upgrade to Rollup 3 or use a different plugin."},{"fix":"Use 'import executable from ...'","cause":"Importing named export 'executable' instead of default export.","error":"TypeError: executable is not a function"},{"fix":"Use 'output.file' or avoid using this plugin with directory output.","cause":"Using 'output.dir' with multiple chunks; plugin expects single file output.","error":"Error: [plugin: executable] Cannot read properties of undefined (reading 'fileName')"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}