esbuild Linux ARM Binary

0.15.18 · active · verified Sun Apr 19

This package, `esbuild-linux-arm`, is a platform-specific binary component for esbuild, an extremely fast JavaScript and CSS bundler and minifier. The main `esbuild` package (currently at v0.28.0) automatically installs the correct platform-specific binary, making this package an indirect dependency for most users. esbuild is renowned for its exceptional speed, often performing builds 10 to 100 times faster than alternatives like Webpack or Rollup, attributed to its implementation in Go, extensive parallelism, and optimized algorithms. It maintains a sustainable and active release cadence, with frequent updates addressing bugs, introducing new features, and incorporating JavaScript specification changes. Key differentiators include its high performance, minimal configuration, built-in support for TypeScript and JSX transformation, and a growing plugin ecosystem.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to programmatically use esbuild's `build` API to bundle, minify, and create a sourcemap for a TypeScript entry file, targeting a Node.js environment.

import { build } from 'esbuild';
import path from 'path';
import url from 'url';

const __dirname = path.dirname(url.fileURLToPath(import.meta.url));

async function bundleCode() {
  try {
    await build({
      entryPoints: [path.resolve(__dirname, 'src/index.ts')],
      bundle: true,
      minify: true,
      sourcemap: true,
      outfile: path.resolve(__dirname, 'dist/bundle.js'),
      platform: 'node',
      target: 'es2020',
      logLevel: 'info',
    });
    console.log('Build successful: dist/bundle.js created.');
  } catch (error) {
    console.error('Build failed:', error);
    process.exit(1);
  }
}

bundleCode();

// To make this runnable, create src/index.ts:
// export function greet(name: string): string {
//   return `Hello, ${name}!`;
// }
// console.log(greet('esbuild user'));

view raw JSON →