esroll

raw JSON →
1.2.3 verified Fri May 01 auth: no javascript

Build tool combining esbuild and rollup for bundling TypeScript and JavaScript with declaration generation and API documentation. Current stable version is 1.2.3, released with active development and regular updates. Requires Node >=24. It integrates esbuild's fast bundling with rollup's plugin ecosystem and adds declaratino generation via API Extractor and docgen. Differentiators include unified pipeline, built-in doc generation, and first-class TypeScript support.

error Error: Cannot find module 'esroll'
cause Package not installed or module resolution misconfigured.
fix
npm install esroll --save-dev
error TypeError: esroll.build is not a function
cause Using named import incorrectly or mixing ESM/CJS.
fix
Use import { build } from 'esroll' (ESM) instead of const { build } = require('esroll') (CJS).
error Error: RollupError: Could not resolve entry module
cause Entry point file path is incorrect or missing.
fix
Check that entryPoints array contains valid paths relative to cwd.
error Error: esbuild: Build failed with 1 error:...
cause Syntax error or missing dependency in source code.
fix
Fix the TypeScript/JS error indicated in the message.
breaking Node >=24 required; earlier versions are not supported.
fix Use v0.x if Node <24, or upgrade Node to >=24.
deprecated The options `declaration` and `docs` have been renamed to `dts` and `doc` respectively.
fix Use `dts: true` and `doc: true` instead.
gotcha Sourcemaps from esbuild may be lost during rollup handoff if not properly configured.
fix Ensure `sourcemap` option is set in both esbuild and rollup configs.
gotcha Bundle may fail or produce unexpected output when using non-standard file extensions.
fix Only use .ts, .tsx, .js, .jsx, .mjs, .cjs as entry points.
npm install esroll
yarn add esroll
pnpm add esroll

Shows basic usage of esroll to bundle a TypeScript entry point with declaration generation and API docs.

import { build } from 'esroll';

await build({
  entryPoints: ['src/index.ts'],
  outdir: 'dist',
  format: 'esm',
  dts: true,
  doc: true,
});

// Output: ESM bundle + .d.ts declarations + API documentation