esbuild Darwin ARM 64-bit Binary

0.15.18 · active · verified Sun Apr 19

esbuild is an extremely fast JavaScript bundler and minifier, written in Go and compiled to native code. It is known for its high performance, often outperforming other bundlers by 10-100x, making it ideal for development workflows, build tools, and server-side bundling. The project generally has a rapid release cadence, with the main `esbuild` package currently stable around version `0.28.x` (as indicated by recent changelog entries, though the specific `esbuild-darwin-arm64` binary package provided here is version `0.15.18`). Key differentiators include its speed, low configuration overhead, and ability to handle JavaScript, TypeScript, JSX, TSX, CSS, and image assets. It's often used as a dependency in larger build systems like Vite or directly for CLI bundling tasks. This specific entry pertains to the `esbuild-darwin-arm64` package, which provides the macOS ARM 64-bit binary component for the `esbuild` ecosystem.

Common errors

Warnings

Install

Imports

Quickstart

Demonstrates a basic esbuild bundling operation for a TypeScript entry point, including minification, sourcemaps, targeting a specific platform, and a simple plugin example to log build events.

import { build } from 'esbuild';

const entryPoint = 'src/index.ts';
const outputPath = 'dist/bundle.js';

async function main() {
  try {
    const result = await build({
      entryPoints: [entryPoint],
      bundle: true,
      minify: true,
      sourcemap: true,
      outfile: outputPath,
      platform: 'node', // or 'browser', 'neutral'
      target: 'es2020',
      logLevel: 'info',
      plugins: [
        // Example: A simple plugin that logs file paths before the build starts
        {
          name: 'log-paths',
          setup(build) {
            build.onStart(() => {
              console.log(`
Starting esbuild process for: ${entryPoint}`);
            });
            build.onEnd(result => {
              if (result.errors.length === 0) {
                console.log(`Build successful: ${outputPath}`);
              } else {
                console.error('Build failed with errors:', result.errors);
              }
            });
          },
        },
      ],
    });
    console.log('esbuild build operation completed.');
    if (result.warnings.length > 0) {
        console.warn('Warnings:', result.warnings);
    }
  } catch (e) {
    console.error('An unhandled error occurred during build:', e.message);
    process.exit(1);
  }
}

main();

view raw JSON →