esbuild Linux MIPS64LE Native Binary

0.15.18 · active · verified Tue Apr 21

esbuild is an extremely fast JavaScript bundler and minifier, primarily developed in Go, excelling at processing JavaScript, TypeScript, JSX, CSS, JSON, and other web assets with remarkable speed. It's a popular choice for accelerating build pipelines and development server hot-reloading due to its performance. The project maintains a rapid release cadence, with frequent minor and patch updates, alongside occasional major releases that may introduce significant new features or breaking changes. This specific package, `esbuild-linux-mips64le`, provides the pre-compiled native binary for Linux MIPS 64-bit Little Endian architectures. It serves as a critical runtime dependency for the main `esbuild` npm package when installed on compatible MIPS64LE systems, enabling the JavaScript wrapper to execute the native bundler logic. While this binary package is at version `0.15.18`, the current stable version of the core `esbuild` package is `0.20.24`.

Common errors

Warnings

Install

Imports

Quickstart

Demonstrates a basic esbuild bundling operation, compiling a TypeScript entry point with a utility module into a single JavaScript file, with minification and sourcemaps toggled by NODE_ENV.

import { build } from 'esbuild';
import path from 'node:path';
import process from 'node:process';
import { writeFileSync, mkdirSync } from 'node:fs';

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

// Create dummy entry points for the quickstart
mkdirSync('src', { recursive: true });
writeFileSync(entryPoint, `
import { add } from './utils';

console.log('Hello from esbuild!');
console.log('2 + 3 =', add(2, 3));
`);
writeFileSync('src/utils.ts', `
export function add(a: number, b: number): number {
  return a + b;
}
`);

async function runBuild() {
  try {
    await build({
      entryPoints: [entryPoint],
      bundle: true,
      minify: process.env.NODE_ENV === 'production',
      sourcemap: process.env.NODE_ENV !== 'production',
      outfile: path.join(outputDir, outputFileName),
      platform: 'node', // Can be 'browser', 'node', or 'neutral'
      target: 'es2022',
      logLevel: 'info',
      // Example plugin usage:
      // plugins: [{
      //   name: 'example',
      //   setup(build) {
      //     build.onResolve({ filter: /\./ }, args => {
      //       if (args.path === 'foo') return { path: args.path, namespace: 'foo-ns' };
      //     });
      //     build.onLoad({ filter: /foo/, namespace: 'foo-ns' }, () => ({
      //       contents: 'export default "bar";',
      //       loader: 'js',
      //     }));
      //   },
      // }],
    });
    console.log(`Build successful: ${path.join(outputDir, outputFileName)}`);
  } catch (e) {
    console.error('Build failed:', e);
    process.exit(1);
  }
}

runBuild();

view raw JSON →