{"id":22015,"library":"rollup-plugin-execute","title":"rollup-plugin-execute","description":"A Rollup plugin that executes shell commands sequentially after the bundle is generated. Version 1.1.1 is stable with no recent releases; it accepts a command string or array of commands and runs them in order using child_process.execSync. Lightweight and zero-dependency, ideal for post-build tasks like copying files or opening a browser. Alternative to rollup-plugin-shell, but simpler with no cross-platform handling.","status":"active","version":"1.1.1","language":"javascript","source_language":"en","source_url":"https://github.com/audinue/rollup-plugin-execute","tags":["javascript","rollup","plugin"],"install":[{"cmd":"npm install rollup-plugin-execute","lang":"bash","label":"npm"},{"cmd":"yarn add rollup-plugin-execute","lang":"bash","label":"yarn"},{"cmd":"pnpm add rollup-plugin-execute","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package is ESM-only; CommonJS require will fail.","wrong":"const execute = require('rollup-plugin-execute')","symbol":"execute","correct":"import execute from 'rollup-plugin-execute'"}],"quickstart":{"code":"// rollup.config.js\nimport execute from 'rollup-plugin-execute'\n\nexport default {\n  input: 'src/index.js',\n  output: { file: 'dist/bundle.js', format: 'esm' },\n  plugins: [\n    execute('echo \"Build complete\" > dist/status.txt')\n  ]\n}","lang":"javascript","description":"Minimal Rollup config that writes a status file after bundle generation using execute()."},"warnings":[{"fix":"Keep commands quick to avoid slowing down the build; consider async alternatives for long tasks.","message":"execute() runs synchronously using execSync, blocking the build until commands finish.","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":"Use import statement or set type: 'module' in package.json.","cause":"rollup-plugin-execute is ESM-only and cannot be required with CommonJS.","error":"Error [ERR_REQUIRE_ESM]: require() of ES Module not supported"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}