{"id":24919,"library":"arc-plugin-esbuild","title":"arc-plugin-esbuild","description":"A plugin for the Architect serverless framework that uses esbuild to bundle Lambda functions with dependency inclusion and tree-shaking. Version 3.0.0 introduces esbuild as the runtime, which is a breaking change requiring explicit runtime configuration. Active development with regular releases, targeting Node 14.13+ or 16+. Ships TypeScript types. Differentiator: integrates directly into Architect's `app.arc` config, supports config files for esbuild plugins, and allows custom build directories.","status":"active","version":"3.0.0","language":"javascript","source_language":"en","source_url":"ssh://git@github.com/reconbot/arc-plugin-esbuild","tags":["javascript","serverless","architect","plugin","esbuild","typescript"],"install":[{"cmd":"npm install arc-plugin-esbuild","lang":"bash","label":"npm"},{"cmd":"yarn add arc-plugin-esbuild","lang":"bash","label":"yarn"},{"cmd":"pnpm add arc-plugin-esbuild","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency for bundling functions","package":"esbuild","optional":false}],"imports":[{"note":"This is a plugin, not imported in code; configured via app.arc file.","wrong":"import in JavaScript","symbol":"arc-plugin-esbuild","correct":"Add to app.arc: @plugins\narc-plugin-esbuild"}],"quickstart":{"code":"npm i --save-dev arc-plugin-esbuild\ntouch app.arc\necho '@app\nmyapp\n\n@aws\nruntime esbuild\n\n@http\nget /\n\n@plugins\narc-plugin-esbuild' > app.arc\n\n# Create a handler file\nmkdir -p src/http/get-index\ntouch src/http/get-index/index.ts\n# index.ts content:\nexport async function handler(req: any) {\n  return { statusCode: 200, body: 'Hello!' };\n}","lang":"typescript","description":"Installs the plugin, configures app.arc with required pragmas, and creates a simple TypeScript handler."},"warnings":[{"fix":"Add `@aws\nruntime esbuild` to app.arc.","message":"v3.0.0 changed esbuild from a build step to the runtime. You must set @aws runtime esbuild in your app.arc file.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Migrate to runtime mode by setting @aws runtime esbuild.","message":"The `plugin` build method is deprecated in favor of the new runtime mode.","severity":"deprecated","affected_versions":">=3.0.0"},{"fix":"Set `buildDirectory src` in @esbuild to avoid hydration issues.","message":"Hydration (shared code) is not supported with custom runtimes. You must inline all shared code or use a build directory.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Add `external @prisma/client aws-sdk` to @esbuild pragma.","message":"The `external` option defaults to `aws-sdk`. If you need other external packages, you must list them explicitly.","severity":"gotcha","affected_versions":">=2.3.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Add `@esbuild\nbuildDirectory src` to app.arc.","cause":"Missing or misconfigured buildDirectory in app.arc @esbuild pragma.","error":"Error: [esbuild] Plugin arc-plugin-esbuild: buildDirectory must be set before runtime. Available: 'src'"},{"fix":"Ensure app.arc has proper pragmas and indentation: `@http\nget /`.","cause":"Missing @http pragma or incorrect indentation in app.arc.","error":"TypeError: Cannot destructure property 'get' of 'undefined' or null."},{"fix":"Run `npm install esbuild --save-dev`.","cause":"Missing peer dependency esbuild.","error":"Error: 'esbuild' is not in the npm registry."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}