esbuild FreeBSD 64-bit Binary

0.15.18 · active · verified Sun Apr 19

esbuild-freebsd-64 is a specific platform binary package providing the core native module for esbuild on FreeBSD 64-bit systems. esbuild is a high-performance JavaScript bundler and minifier known for its exceptional speed. It processes JavaScript, TypeScript, JSX, TSX, CSS, and JSON, offering features like tree-shaking, minification, source map generation, and a powerful transformation API. While the main esbuild project is actively developed, with versions reaching up to `v0.28.x` (as of April 2026), this specific binary package (`esbuild-freebsd-64`) is at version `0.15.18`, corresponding to older `esbuild` releases. Users typically interact with the main `esbuild` package, which then selects and leverages the appropriate platform-specific binary, such as this one, as an optional dependency. Its primary differentiator is its build speed, making it suitable for development workflows where rapid rebuilds are critical, often outperforming other bundlers like Webpack or Rollup.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to use the esbuild `build` API to bundle a TypeScript file into an optimized ES module for Node.js, including minification and source maps.

import { build } from 'esbuild';
import path from 'path';
import fs from 'fs/promises';

const entryPoint = './src/index.ts';
const outputDir = './dist';

async function buildProject() {
  try {
    await fs.mkdir(outputDir, { recursive: true });
    await fs.writeFile(path.join(path.dirname(entryPoint), path.basename(entryPoint)), `
      console.log('Hello from esbuild!');
      export const foo = 'bar';
    `);

    const result = await build({
      entryPoints: [entryPoint],
      bundle: true,
      outdir: outputDir,
      platform: 'node',
      target: 'es2020',
      minify: true,
      sourcemap: true,
      logLevel: 'info',
      format: 'esm',
    });

    if (result.errors.length > 0) {
      console.error('Build failed with errors:', result.errors);
    } else {
      console.log('Build successful! Output in:', outputDir);
      const outputFile = path.join(outputDir, 'index.js');
      const content = await fs.readFile(outputFile, 'utf-8');
      console.log('\n--- Output Content (truncated) ---\n', content.substring(0, 200), '...');
    }
  } catch (e) {
    console.error('An unexpected error occurred during build:', e);
  }
}

buildProject();

view raw JSON →