esbuild Android ARM 64-bit Binary

0.15.18 · active · verified Tue Apr 21

This package provides the pre-compiled Android ARM 64-bit binary for esbuild, a high-performance JavaScript bundler and minifier. It is primarily consumed as an optional platform-specific dependency by the main `esbuild` npm package, which automatically selects and utilizes the appropriate binary for the host system. The overarching `esbuild` project is actively maintained with frequent releases, often including multiple patch versions per month and minor versions every few months, ensuring rapid bug fixes and feature enhancements. It is renowned for its exceptional speed, achieved by being written in Go and compiling to native code, distinguishing it significantly from JavaScript-based bundlers such as Webpack or Rollup. The current stable version for the main `esbuild` project is 0.28.0. This specific package, `esbuild-android-arm64`, does not expose any direct JavaScript API; its sole purpose is to supply the underlying executable for environments targeting Android ARM 64-bit architectures.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates a basic esbuild configuration to bundle a TypeScript application, including generating source maps, minifying code, targeting specific environments, and incorporating a simple custom plugin for build lifecycle logging. This code leverages the main `esbuild` package, which utilizes this binary.

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

// Define your entry point and output file paths
const entryPoint = path.resolve(process.cwd(), 'src/index.ts');
const outFile = path.resolve(process.cwd(), 'dist/bundle.js');

async function runBuild() {
  try {
    // Configure and run the esbuild bundling process
    await build({
      entryPoints: [entryPoint],
      bundle: true, // Enable bundling
      outfile: outFile, // Specify the output file
      platform: 'node', // Target Node.js environment
      format: 'esm', // Output ES Module format
      sourcemap: true, // Generate source maps
      minify: true, // Enable minification
      target: ['es2020', 'node18'], // Target JavaScript and Node.js versions
      define: { 'process.env.NODE_ENV': '"production"' }, // Define global variables
      plugins: [
        // Example of a simple esbuild plugin logging build events
        {
          name: 'my-build-logger',
          setup(build) {
            build.onStart(() => {
              console.log('esbuild process started...');
            });
            build.onEnd(result => {
              if (result.errors.length > 0) {
                console.error('esbuild finished with errors:', result.errors);
              } else {
                console.log('esbuild finished successfully!');
              }
            });
          }
        }
      ]
    });
    console.log(`Application bundled to ${outFile}`);
  } catch (error) {
    console.error('esbuild failed during build:', error);
    process.exit(1);
  }
}

runBuild();

view raw JSON →