An esbuild plugin that transforms Effect-TS gen block syntax (`const result = yield* effect`) into valid JavaScript. Version 0.2.0 supports esbuild >=0.17.0. It is part of the effect-sugar ecosystem alongside effect-sugar-vite and effect-sugar-tsc. Enables using Effect-TS generators without requiring ts-patch or Vite. Different from effect-sugar-tsc which uses ts-patch, this plugin integrates directly as an esbuild plugin for faster builds. Ships TypeScript type definitions. Released by clayroach on GitHub under MIT license.
npm install effect-sugar-esbuildNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates adding the Effect-TS sugar plugin to esbuild for transforming gen blocks in both config file and programmatic usage.
Pin to exact version (e.g., effect-sugar-esbuild@0.2.0) to avoid unexpected breaks.
Upgrade esbuild to >=0.17.0.
Install effect (e.g., effect, @effect/core) separately.
Use import instead of require, or set "type": "module" in package.json.
Use plugins: [effectSugarESBuild()] (with parentheses) in esbuild config.