Registry / devops / rollup-plugin-executable-output

rollup-plugin-executable-output

JSON →
library1.3.0jsnpmunverified

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.

npm install rollup-plugin-executable-output
INSTALL
IMPORT
SIG · ROLLUP-PLUGIN-EXEC
R
rollup-plugin-executable-output
devopsjavascriptv1.3.0
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–223 runs
build_error
glibc
node 18–223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
✓ import executable from 'rollup-plugin-executable-output'
✗ const executable = require('rollup-plugin-executable-output')
ESM-only; no CommonJS export. Use import syntax.
executable
✓ import executable from 'rollup-plugin-executable-output'
Default export is the plugin function; no named export.
TypeScript usage
✓ // No types included; use @types/rollup or declare module
Package does not ship TypeScript definitions; may need custom module declaration.

Minimal Rollup config making a CLI bundle executable, with shebang preservation.

// rollup.config.js import executable from 'rollup-plugin-executable-output'; import shebang from 'rollup-plugin-preserve-shebang'; export default { input: 'src/cli.js', output: { file: 'dist/cli.js', format: 'cjs', }, plugins: [shebang(), executable()], };
Debug
Known issues
gotchaPlugin only applies chmod 755 to outputs generated by Rollup; it does not handle files copied by other plugins (e.g., rollup-plugin-copy).
fix
Use a dedicated chmod utility or post-build script for external files.
affects: >=1.0.0
gotchaThe plugin must be placed after other output-modifying plugins (e.g., shebang) in the plugins array to ensure the final output is made executable.
fix
Order plugins so executable() is last among those that modify output.
affects: >=1.0.0
gotchaDoes not work with Rollup's 'output.dir' option for multiple chunks; only intended for single-file outputs via 'output.file'.
fix
Use only 'output.file' or consider 'rollup-plugin-chmod' for directories.
affects: >=1.0.0
deprecatedNo active development; last update 2022. May not support Rollup 4+ hooks if they change.
fix
Pin Rollup to version 3 or test compatibility.
affects: >=1.0.0
Errors
Common errors & fixes
Error: The plugin 'rollup-plugin-executable-output' is not compatible with Rollup 4. Upgrade to Rollup 3 or use a different plugin.
Rollup 4 deprecated the 'generateBundle' hook signature used by older versions.
fix
Use Rollup 3.x or switch to 'rollup-plugin-chmod' which may have been updated.
TypeError: executable is not a function
Importing named export 'executable' instead of default export.
fix
Use 'import executable from ...'
Error: [plugin: executable] Cannot read properties of undefined (reading 'fileName')
Using 'output.dir' with multiple chunks; plugin expects single file output.
fix
Use 'output.file' or avoid using this plugin with directory output.
Upgrade
Version history
1.3.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
2
Bingbot
1
Resources
rollup-plugin-executable-output — npm install rollup-plugin-executable-output · libregistry