{"id":25406,"library":"esbuild-plugin-run","title":"esbuild-plugin-run","description":"ESBuild plugin that automatically executes the output file (e.g., a Node.js script) after a successful build. Version 0.3.0 is current, with a simple API: specify the output format (cjs, esm, iife) and optionally the entry point path. It integrates seamlessly into ESBuild's plugin system and requires esbuild ^0.14.0 as a peer dependency. Differentiators: minimal configuration, built-in TypeScript types, and no external runtime deps.","status":"active","version":"0.3.0","language":"javascript","source_language":"en","source_url":"https://github.com/linbudu599/nx-plugins","tags":["javascript","esbuild","ESBuild","run","plugin","typescript"],"install":[{"cmd":"npm install esbuild-plugin-run","lang":"bash","label":"npm"},{"cmd":"yarn add esbuild-plugin-run","lang":"bash","label":"yarn"},{"cmd":"pnpm add esbuild-plugin-run","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency required for plugin API","package":"esbuild","optional":false}],"imports":[{"note":"ESM-only; CommonJS require will fail.","wrong":"const run = require('esbuild-plugin-run')","symbol":"run","correct":"import { run } from 'esbuild-plugin-run'"},{"note":"Both named and default exports exist; default is identical to named.","wrong":"import { run } from 'esbuild-plugin-run'","symbol":"default","correct":"import run from 'esbuild-plugin-run'"},{"note":"Type-only import for TypeScript users.","wrong":null,"symbol":"RunPluginOptions","correct":"import type { RunPluginOptions } from 'esbuild-plugin-run'"}],"quickstart":{"code":"import { run } from 'esbuild-plugin-run';\nimport * as esbuild from 'esbuild';\n\nawait esbuild.build({\n  entryPoints: ['src/index.ts'],\n  bundle: true,\n  outfile: 'dist/index.js',\n  format: 'cjs',\n  plugins: [run({\n    format: 'cjs',\n    pattern: '**/*.js'\n  })]\n});","lang":"typescript","description":"Shows how to use the run plugin in an ESBuild build pipeline with TypeScript entry point."},"warnings":[{"fix":"Ensure your build completes without errors.","message":"The plugin only runs after a successful build; errors will prevent execution.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Set the plugin's format to the same value as ESBuild's format.","message":"The 'format' option must match the output format of ESBuild; otherwise execution may fail.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `npm install esbuild-plugin-run esbuild@^0.14.0`","cause":"Package not installed or not matching peer dependency version.","error":"Error: Cannot find module 'esbuild-plugin-run'"},{"fix":"Use `import { run } from 'esbuild-plugin-run'` instead of `require()`.","cause":"Using wrong import syntax (CommonJS require for ESM-only package).","error":"TypeError: run is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}