npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

sea-plugin

v0.6.0

Published

A Webpack/Esbuild plugin to generate a Node SEA executable for all platforms.

Downloads

243

Readme

sea-plugin

A Webpack / Esbuild plugin for cross-platform generation of Node's SEA (Single executable applications).

📖 Overview

The sea-plugin is a Webpack / Esbuild plugin designed to create Node’s single executable applications (SEA), offering cross-platform builds (Windows, macOS, and Linux) from any environment. It streamlines the process of bundling Node.js apps into a single file—automatically downloading the required Node.js binary, generating a SEA configuration file, and embedding assets into the final executable.

✨ Features

  • 🏗 Automates SEA Configuration – Generates sea-config.json for packaging Node.js applications.
  • ⬇️ Automatic Node.js Download & Caching – Downloads Node.js for specified platforms and caches it for future use.
  • 📂 Assets Manifest Generation – Embeds assets into the SEA configuration.
  • 🏆 Multi-Platform Support – Supports Windows, macOS, and Linux builds.

🚀 Installation

Install sea-plugin using npm or yarn:

npm install --save-dev sea-plugin

or

yarn add --dev sea-plugin

⚙️ Usage

Basic Webpack Configuration

Add sea-plugin to your Webpack configuration:

import { SeaWebpackPlugin } from 'sea-plugin';
import path from 'path';

export default {
  entry: './src/index.js',
  output: {
    filename: 'bundle.js',
    path: path.resolve(__dirname, 'dist')
  },
  plugins: [
    new SeaWebpackPlugin({
      name: 'my-app',
      nodeVersion: '23.9.0',
      os: ['win-x64', 'linux-x64', 'darwin-x64', 'darwin-arm64']
      assets: {
        'assets/icon.jpg': { 
          src: 'src/assets/icon_win.jpg',
          os: ['win-x64'],
          options: { 
            /*any custom options */
          } 
        },
        'assets/logo.png': { 
          src: 'src/assets/logo_linux.png',
          os: ['linux-x64'],
          options: { 
            /*any custom options */
          }
        }
      }
    })
  ]
};

The following apps will be published to the dist folder: my-app-win-x64.exe, my-app-linux-x64, my-app-darwin-x64 and my-app-darwin-arm64.

Basic Esbuild Configuration

Add sea-plugin to your Esbuild configuration:

// build.mjs  (run with:  node --experimental-modules build.mjs)
import { build } from 'esbuild';
import { SeaEsbuildPlugin } from 'sea-plugin';
import path from 'path';

// Common output folder
const outDir = path.resolve('dist');

await build({
  entryPoints: ['./src/index.js'],
  outfile: path.join(outDir, 'bundle.js'),   // single‑file bundle
  bundle: true,
  platform: 'node',
  format: 'esm',   // or 'cjs' if your project needs it
  plugins: [
    SeaEsbuildPlugin({
      name: 'my-app',
      nodeVersion: '23.9.0',
      os: ['win-x64', 'linux-x64', 'darwin-x64', 'darwin-arm64'],
      assets: {
        'assets/icon.jpg': {
          src: 'src/assets/icon.jpg',
          options: {
            /* any custom options */
          }
        },
        'assets/logo.png': {
          src: 'src/assets/logo.png',
          options: {
            /* any custom options */
          }
        }
      }
    })
  ]
});

The following apps will be published to the dist folder: my-app-win-x64.exe, my-app-linux-x64, my-app-darwin-x64 and my-app-darwin-arm64.

🔧 Configuration Options

| Option | Type | Description | |--------------|----------------|-------------| | name | string | Name of the output executable. Default: name of the output bundle. | | nodeVersion | string | Version of Node.js to be used in SEA. This must be the same version as the version being used to build the bundle. Default: 23.9.0. | | os | string | string[] | Target platform(s) (e.g., win-x64, linux-x64, darwin-x64 - mac on x86, darwin-arm64 - mac on M* chips). | | cachePath | string | Path to store downloaded Node.js binaries Default: .node_cache in outputPath. | | assets | object | A key-value map of asset files to be embedded. This json is also dumped in to the assets as manifest.json. Any properties passed in the options can be read using this file. To access the assets in the executable, use node functions sea.getAsset, sea.getAssetAsBlob and sea.getRawAsset. |

📜 License

This project is licensed under the MIT License.

🤖 AI Assisted Development

sea-plugin was developed with the help of AI, enabling the team to complete a fully functional release in just 8 hours.

🐳 Using the Docker (Code-Signing)

This plugin ships with a Dockerfile to facilitate cross-plafrom code signing for your SEA builds. You can find this Docker configurations in the code-sign folder:

  1. Build the Docker Image

    cd code-sign
    docker build -t code-signing-docker .
  2. Generate self signed code certificates (Optional) Usage:

    docker run --rm -v <absolute path to the certs folder>:/certs -it code-signing-docker /app/generate_code_sign_cert.sh <country_code> <organization_name> <password> <cert_path>

    Example:

    docker run --rm -v /home/john/certs:/certs -it code-signing-docker /app/generate_code_sign_cert.sh US "RIKSOF Inc" **** /cert/my_app_cert_self
  3. Sign the Windows build Usage:

    docker run --rm -v <absolute path to the certs folder>:/certs <absolute path to the project folder>:/project /app/sign_exe.sh /project/<path_to_exe> /certs/<key_file> <password> <application_name> <url>

    Example:

    docker run --rm -v /home/john/certs:/certs -v /home/john/project:/project -it code-signing-docker /app/sign_exe.sh /project/dist/my-app-win-x64.exe /cert/my_app_cert_self.pfx *** "Application Name" https://www.mydomain.com
  4. Sign the Mac OS build Usage:

    docker run --rm -v <absolute path to the certs folder>:/certs <absolute path to the project folder>:/project /app/sign_macos.sh /project/<executable_path> /certs/<p12/pfx_file> <p12_password> <identifier>

    Example:

    docker run --rm -v /home/john/certs:/certs -v /home/john/project:/project -it code-signing-docker /app/sign_macos.sh /project/dist/my-app-darwin-arm64 /cert/my_app_cert_self_macos.pfx *** com.domain.my-app

This approach ensures your executables are properly signed and trusted across multiple platforms, further streamlining your SEA distribution.


© 2025 RIKSOF, Inc. All rights reserved.