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

bun-dev-server

v1.0.4

Published

A simple development server for TypeScript projects using Bun

Readme

Bun Dev Server

A a dev server like Webpack dev server but only with bun, uses internal server available from Bun.serve()

Available at NPM Repository

Bun

bun i bun-dev-server

Npm

npm i bun-dev-server

Example config

//devserver.ts
import { startBunDevServer } from "bun-dev-server";
import { file } from "bun";

startBunDevServer(
  {
    buildConfig: {
      entrypoints: ["./src/app.ts"],
      //...
      outdir: "dist",
      splitting: true,
      naming: {
        asset: "assets/[name]-[hash].[ext]",
        chunk: "chunks/[name]-[hash].[ext]",
      },
    },
    tls: {
      cert: file("./serve_cert.pem"),
      key: file("./serve_key.pem"),
    },
    port: 44345,
    watchDir: "./src",
    hotReload: "plugin",
    writeManifest: false,
    cleanServePath: true,
    logRequests: true,
    reloadOnChange: true,
    watchDelay: 2000,
  },
  import.meta
);

Then

bun run devserver.ts

Options

Options that are available for configuration | Option | Required | Default | Description | |------------------------|--------------|--------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | port | true | N/A | The port to run the server on. | | buildConfig | true | N/A | The build configuration to use for the server. | | watchDir | true | N/A | The directory to watch for changes. | | watchDelay | false | 1000 | The delay in milliseconds to wait before starting a new build once a file has changed. Used in debounce function, in case many changes happen in file system at once. | | enableTSC | false | false | Whether to enable TypeScript checking it will use tscConfigPath in your project directory. | | tscConfigPath | false | ./tsconfig.json | The path to the TypeScript configuration file. | | writeManifest | false | false | Whether to write the manifest file. | | manifestName | false | bun_server_manifest.json| The name of the manifest file. | | manifestWithHash| false | false | Whether to include the hash with the entrypoints in the manifest file. | | hotReload | false | none | Where to place hot reload script. Available values: "plugin" | "footer" | "none" | | reloadOnChange | false | false | Whether to reload the page when a file changes. This requires property hotReload to be set to "plugin" or "footer". | | logRequests | false | false | Whether to log HTTP requests to the console. | | servePath | false | outdir in build config or ./dist | The path to the directory to serve files from. Takes precedence over buildConfig.outdir. | | cleanServePath | false | false | Whether to clean the servePath before building a new batch. | | serveOutputEjs | false | Built-in template | The EJS template used for the output of the / path on the server. When supplying your own template, the properties that are provided during rendering are files and dirs both are arrays. | | serveIndexHtmlEjs | false | Built-in template | The EJS template used for the output of the /index.html path on the server. When supplying your own template, the property that is provided during rendering is hashedImports that is an array of strings. | | createIndexHTML | false | true | Whether to create index.html using serveIndexHtmlEjs template. | | beforeBuild | false | undefined | Event listener to execute before Bun builds | | afterBuild | false | undefined | Event listener to execute after Bun builds | | tls | false | undefined | Secure options for the server. Forwards buns TLSOptions | | websocketPath | false | /hmr-ws | The websocket path to use for the server. | | static | false | undefined | Static bun responses, can be used for things like /favicon.ico etc. | | waitForTSCSuccessBeforeReload | false | undefined | Whether to wait for the TypeScript check to finish before reloading the page. | | broadcastBuildOutputToClient | false | true | Whether to broadcast the build output to the browser. | broadcastBuildOutputToConsole | false | true | Whether to broadcast the build output to the console. | broadcastTSCErrorToClient | false | undefined | Whether to broadcast the TypeScript check error to the client.