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 🙏

© 2025 – Pkg Stats / Ryan Hefner

standaloner

v0.1.11

Published

Create self-contained, deployable Node.js applications by bundling your code and including necessary dependencies.

Readme

Standaloner

Create self-contained, deployable Node.js applications by bundling your code and including necessary dependencies.

Features

  • Deployment-ready output directory with all dependencies included
  • Intelligent bundling with proper handling of native modules and dependencies
  • Preserves file references (URLs, paths) and handles multiple dependency versions
  • Vite integration via plugin

Installation

# npm
npm install standaloner

# yarn
yarn add standaloner

# pnpm
pnpm add standaloner

Usage

Basic Usage

import standaloner from 'standaloner';

// Single entry point
await standaloner({
  input: 'src/server.js',
  outDir: 'dist'
});

// Multiple entry points
await standaloner({
  input: ['src/server.js', 'src/workers/queue.js'],
  outDir: 'dist'
});

With Vite

// vite.config.js
import { defineConfig } from 'vite';
import standaloner from 'standaloner/vite';

export default defineConfig({
  plugins: [standaloner({
    // Options (all optional)
    bundle: false,     // Set to true to bundle into a single file
    minify: false,     // Set to true to minify output
    trace: true,       // Set to false to disable dependency tracing
    external: []       // Array of packages to exclude from bundling
  })] // Uses Vite's build pipeline instead of Rolldown
});

Common Use Cases

  • SSR Applications: Build with Vite and deploy the self-contained output
  • Native Dependencies: Use modules that can't be bundled without special configuration
  • Microservices: Create standalone deployable units for each service

Configuration Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | input | string \| string[] | - | Input file(s) to process | | outDir | string | '<inputDir>/dist' | Output directory | | bundle | boolean \| object | true | Bundle options or disable bundling | | trace | boolean | true | Whether to trace dependencies | | cleanup | boolean | false | Delete input files after processing | | verbose | boolean | false | Enable verbose logging |

Advanced Options

await standaloner({
  input: 'src/index.js',
  outDir: 'dist',
  bundle: {
    // Specify packages to exclude from bundling
    external: ['some-native-module', /^my-org-packages/],

    // Add Rolldown plugins
    plugins: [myPlugin()],

    // Output options
    output: { format: 'esm' }
  }
});

How It Works

  1. Bundle & Relocate: Uses Rolldown to bundle code and relocate referenced files to .static (or Vite's build pipeline when using the Vite plugin)
  2. Trace: Uses Vercel's Node File Trace to detect dependencies that can't be bundled
  3. Organize: Copies dependencies to output with proper node_modules structure

License

MIT