esbuild Illumos 64-bit Binary

raw JSON →
0.15.18 verified Sat Apr 25 auth: no javascript

This package provides the `illumos 64-bit` native executable for esbuild, a high-performance JavaScript bundler and minifier. Esbuild, currently at version `0.28.0` as of early April 2026, is renowned for its exceptional speed, largely due to its implementation in Go, making it significantly faster than bundlers written in JavaScript. It offers capabilities for bundling JavaScript, TypeScript, JSX, TSX, CSS, and image files, supporting both ESM and CommonJS formats. The project maintains a rapid release cadence, with frequent patch updates and minor versions typically released every few months, addressing bugs, introducing new features, and enhancing performance. It differentiates itself through its aggressive performance focus, minimal configuration, and robust support for modern web technologies.

error No loader is configured for ".css" files: /path/to/style.css
cause Esbuild encountered a file type (like `.css`, `.png`, `.svg`) for which no specific loader is configured in the build options.
fix
Add a loader configuration to your build options for the problematic file type, e.g., { loader: { '.css': 'css', '.png': 'file' } } for CSS files, or 'file' for assets.
error Could not resolve "my-npm-package" (use "--log-limit=0" to disable this message)
cause Esbuild cannot find the specified module. This often happens when a `node_modules` dependency is expected to be bundled but is treated as external, or the import path is incorrect.
fix
Ensure the module is installed. If it's a node_modules dependency, either explicitly include it in your bundle by removing it from the external option or, for Node.js targets, ensure it's correctly externalized (external: ['*']). Verify the import path is correct and consider platform: 'node' if bundling for Node.js.
error Syntax error: Expected ":" but found "!"
cause The JavaScript syntax used is not supported by the configured target environment (e.g., using newer ECMAScript features with an older `target` setting), or there's a fundamental syntax error in the code.
fix
Adjust your target option in esbuild to a newer ECMAScript version (e.g., es2020, esnext, es2023). Review the specified file and line number to correct any syntax mistakes.
error Error [ERR_REQUIRE_ESM]: require() of ES Module (...) from (...) not supported. Instead change the require of (...) in (...) to a dynamic import() which is available in all CommonJS modules.
cause This runtime error occurs when a CommonJS module attempts to `require()` an ES Module, which Node.js does not directly support. This is a common interop issue when bundling for Node.js with mixed module formats.
fix
When bundling for Node.js (platform: 'node'), prioritize format: 'cjs' or carefully manage external ESM dependencies. If format: 'esm' is used, CJS dependencies might need to be explicitly bundled or dynamic import() used instead of require(). Review esbuild's --format and --packages options in conjunction with your dependencies.
breaking Esbuild releases, especially prior to a 1.0.0 stable version, can contain deliberate backwards-incompatible changes, often incrementing the minor version (`0.x.0` to `0.y.0`). Users are strongly advised to pin the exact version of `esbuild` in `package.json` (e.g., `"esbuild": "0.28.0"`) or use patch-only version ranges like `~0.28.0` to avoid unexpected breakage from minor version updates.
fix Update your `package.json` to pin the exact esbuild version or use a `~` semver range. Always review the changelog for specific breaking changes when upgrading, particularly across minor versions.
gotcha By default, esbuild does not bundle `node_modules` dependencies for Node.js targets, treating them as external. This can lead to runtime 'module not found' errors if you expect external dependencies to be included in your bundle. For browser environments, these typically need to be bundled.
fix To bundle node_modules dependencies, explicitly remove them from the `external` option. For Node.js targets, `external: ['*']` is often appropriate to prevent bundling all external packages and relying on Node.js's module resolution.
gotcha Esbuild requires explicit 'loaders' for file types it doesn't recognize by default (e.g., `.css` for bundling directly, `.png`, `.svg` for file assets). Without a configured loader, it will report 'No loader is configured for...' and fail to process these files.
fix Configure appropriate loaders in your esbuild build options. For example, `{ loader: { '.css': 'css', '.png': 'file' } }` for CSS and image files, or use plugins designed to handle specific asset types.
deprecated The `startService` API, previously used for programmatic control over the esbuild daemon, has been deprecated. Direct use of `build` and `transform` functions is now the recommended approach, as they internally manage the service lifecycle more efficiently.
fix Migrate away from `startService`. Directly call `build` or `transform` functions. If you need to customize the esbuild binary path, use the `ESBUILD_BINARY_PATH` environment variable or the `esbuild.config` option in some frameworks.
gotcha A security vulnerability (CVE-2024–23334) affecting esbuild versions 0.24.2 and earlier allows malicious websites to send requests to a local development server and read responses, potentially exposing sensitive information. This is particularly relevant when using esbuild's development server.
fix Upgrade esbuild to version 0.25.0 or later immediately. If using esbuild indirectly (e.g., via Angular), utilize package `overrides` or `resolutions` to enforce the secure version. Always verify the fix with `npm audit`.
npm install esbuild-sunos-64
yarn add esbuild-sunos-64
pnpm add esbuild-sunos-64

Demonstrates a basic esbuild setup to bundle a TypeScript file into a single JavaScript output, including minification, sourcemaps, and targeting a browser environment. This script also creates and cleans up temporary input files for a self-contained example.

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

// Ensure output directory exists
const outputDir = path.join(process.cwd(), 'dist');
fs.mkdirSync(outputDir, { recursive: true });

// Create a dummy input file for demonstration
const inputFilePath = path.join(process.cwd(), 'src', 'index.ts');
fs.mkdirSync(path.dirname(inputFilePath), { recursive: true });
fs.writeFileSync(inputFilePath, `
console.log('Hello from esbuild!');
const message: string = 'This is a TypeScript example.';
console.log(message);

async function fetchData() {
  // In a real browser environment, fetch works. For Node.js, you might need a polyfill or specific 'platform' target.
  // This example assumes a context where fetch is available or externalized.
  // const response = await fetch('https://api.example.com/data');
  // const data = await response.json();
  return { example: 'data' };
}

fetchData().then(data => console.log('Fetched data:', data)).catch(console.error);
`, 'utf8');

async function runBuild() {
  try {
    await build({
      entryPoints: [inputFilePath],
      bundle: true,
      outfile: path.join(outputDir, 'bundle.js'),
      platform: 'browser', // Target browser environment
      target: 'es2020',
      minify: true,
      sourcemap: true,
      logLevel: 'info'
    });
    console.log('Build successful! Output in dist/bundle.js');
    console.log('Content of bundle.js:\n' + fs.readFileSync(path.join(outputDir, 'bundle.js'), 'utf8'));

    // Clean up dummy files/folders
    fs.unlinkSync(inputFilePath);
    fs.rmdirSync(path.dirname(inputFilePath));
  } catch (e) {
    console.error('Build failed:', e);
    process.exit(1);
  }
}

runBuild();