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

brovite

v1.3.1

Published

A lightweight Vite-like dev tool and bundler for mobile editors like Acode

Readme

⚡ brovite

A lightweight Vite-like development tool and bundler designed to work especially well in mobile editors like Acode and Termux.

npm version license node


Features

  • ES Module support — write modern import/export syntax
  • 🔗 Recursive bundling — resolves the full dependency graph automatically
  • 🔄 Live reload — browser auto-refreshes on file save via WebSocket
  • 🛠 Dev server — instant local HTTP server with module transformation
  • 📦 Standard build — outputs a single bundle.js + index.html
  • 💼 Professional build — full node_modules resolution, JSX, TypeScript, fonts, images
  • 👀 Preview server — serve your built app locally before deploying
  • 🔌 Plugin API — extend with custom transform hooks
  • 🎨 Clean terminal output — colourised logs via picocolors

Installation

npm install -g brovite

After installation, run brovite from any project directory. esbuild is included — no extra installs needed.


Quick Start

mkdir my-app && cd my-app

cat > main.js << 'EOF'
import { greet } from './utils.js'
greet('World')
EOF

cat > utils.js << 'EOF'
export function greet(name) {
  console.log(`Hello, ${name}!`)
}
EOF

brovite dev
# → http://localhost:3000

CLI Commands

brovite dev [entry]

Start the development server with live reload.

brovite dev                    # entry: main.js, port: 3000
brovite dev src/main.js        # custom entry
brovite dev --port 8080        # custom port
brovite dev --host 0.0.0.0    # expose to network (test on phone)
brovite dev --open             # open browser automatically

| Option | Default | Description | |--------|---------|-------------| | --port <n> | 3000 | HTTP port | | --host <h> | localhost | HTTP host | | --open | false | Open in browser |


brovite build [entry]

Bundle the project for production.

brovite build                         # standard build
brovite build --professional          # full build with node_modules, JSX, fonts
brovite build --professional --minify # + minify output
brovite build src/main.jsx --professional

| Option | Default | Description | |--------|---------|-------------| | --professional | false | Use esbuild engine (see below) | | --outDir <dir> | dist | Output directory | | --minify | false | Minify bundle | | --sourcemap | false | Emit inline source map |

Output:

dist/
├── bundle.js    ← all modules concatenated / bundled
├── bundle.css   ← extracted CSS (professional mode)
└── index.html   ← ready to open in browser

brovite preview

Serve the production build locally.

brovite preview               # serves dist/ on port 4173
brovite preview --port 5000   # custom port
brovite preview --dir out     # custom directory

Standard vs Professional Build

Standard brovite build

Brovite's own lightweight bundler. Best for simple projects with only your own files.

  • ✅ Your own .js files
  • ✅ Relative imports (./utils.js)
  • ✅ No extra dependencies needed
  • ❌ Cannot resolve node_modules
  • ❌ No JSX / TypeScript

Professional brovite build --professional

Uses esbuild under the hood. Best for real projects with npm packages.

  • ✅ Everything in standard mode
  • node_modules resolution (import react from 'react')
  • ✅ React / Vue / Preact / Solid JSX
  • ✅ TypeScript (.ts, .tsx)
  • ✅ Fonts inlined as base64 (no missing font errors)
  • ✅ Images inlined as base64
  • ✅ CSS bundling and extraction
  • ✅ Reads vite.config.js if present
  • ✅ Copies public/ folder to dist/
  • ✅ Handles malformed package.json files gracefully
  • ✅ Tree shaking

ES Module Example

utils.js

export function greet(name) {
  console.log(`Hello, ${name}!`)
}

main.js

import { greet } from './utils.js'
greet('brovite')

Bundled output (dist/bundle.js)

function greet(name) {
  console.log(`Hello, ${name}!`)
}
greet('brovite')

Vite Project Compatibility

brovite works as a drop-in dev server for existing Vite projects:

# Instead of: vite
brovite dev

# Instead of: vite build
brovite build --professional

# Instead of: vite preview
brovite preview

The dev server automatically:

  • Resolves bare imports (import vue from 'vue') from node_modules
  • Transforms JSX and TypeScript on-the-fly
  • Reads vite.config.js for compatible settings
  • Serves unknown routes with index.html (SPA fallback)

React Project Example

npx create-react-app my-app
cd my-app
npm install


brovite dev                         # dev server with live reload
brovite build                       # static handle only css,js,html,module
brovite build --professional        # production bundle
brovite preview                     # preview the build

Font and Asset Handling

In professional mode, brovite automatically converts fonts and images referenced in CSS with absolute paths into base64 data URLs — so they always work in the bundle, even without a server.

Before (your CSS):

@font-face {
  font-family: 'Retro Gaming';
  src: url('/fonts/Retro Gaming.ttf');
}

After (in bundle.css):

@font-face {
  font-family: 'Retro Gaming';
  src: url('data:font/ttf;base64,AAAB...');
}

No missing font errors. No extra files to copy.


Acode / Termux Usage

brovite is optimised for Android development via Termux:

# Install Termux from F-Droid, then:
npm install -g brovite

# Navigate to your project
cd /storage/emulated/0/myapp

# Start dev server (accessible from device browser)
brovite dev --host 0.0.0.0

# Open http://localhost:3000 in your Android browser

For Acode's built-in preview (no server):

brovite build
# Open dist/index.html directly in Acode preview

Plugin API

const myPlugin = {
  name: 'my-plugin',

  // Transform module source before bundling
  transform(code, id) {
    return code.replace(/__VERSION__/g, '1.0.0')
  },

  // Resolve a custom import specifier
  resolveId(specifier, importer) {
    if (specifier === 'virtual:data') return '\0virtual:data'
    return null
  },

  // Load content for a resolved id
  load(id) {
    if (id === '\0virtual:data') return 'export const data = [1, 2, 3]'
    return null
  },

  buildStart() {},
  buildEnd()   {},
}

Architecture

brovite/
├── cli.js                          ← Binary entry (#!/usr/bin/env node)
└── src/
    ├── cli/commands.js             ← CLI (cac) — dev / build / preview
    ├── bundler/
    │   ├── bundle.js               ← Standard build orchestrator
    │   ├── professionalBuild.js    ← Professional build (esbuild-powered)
    │   ├── moduleGraph.js          ← Recursive dependency resolver
    │   ├── parser.js               ← ES module import/export parser
    │   └── transform.js            ← Import/export rewriter
    ├── server/
    │   ├── devServer.js            ← Dev HTTP server + bare import resolver
    │   ├── previewServer.js        ← Static file server
    │   └── websocket.js            ← WebSocket HMR + browser client
    ├── watcher/watcher.js          ← File watcher (chokidar)
    ├── plugins/pluginContainer.js  ← Plugin runner
    └── utils/
        ├── logger.js               ← Terminal output (picocolors)
        ├── resolve.js              ← node_modules resolver
        ├── viteCompat.js           ← Vite config reader + framework detector
        ├── path.js                 ← Path helpers
        └── fs.js                   ← Async fs + MIME types

Dependencies

| Package | Role | |---------|------| | esbuild | Professional bundler — JSX, TS, node_modules | | cac | CLI argument parsing | | chokidar | File watching | | es-module-lexer | Fast import/export parsing | | magic-string | Source-map-friendly code transforms | | ws | WebSocket HMR server | | picocolors | Terminal colours |


Changelog

v1.2.0

  • Fixed: malformed package.json with GNU license headers no longer crashes the build
  • Fixed: absolute font/image paths in CSS (/fonts/Retro Gaming.ttf) are now inlined as base64
  • Added: public/ folder is automatically copied to dist/ in professional mode
  • Added: better framework detection (React 16 vs 17 JSX transform)

v1.1.0

  • Added: brovite build --professional using esbuild
  • Added: bare import resolution in dev server (import vue from 'vue')
  • Added: JSX/TypeScript support in dev mode
  • Added: Vite project compatibility
  • Fixed: brovite preview command not running (cac parsing bug)
  • Fixed: Permission denied on Termux (chmod in prepare script)

v1.0.0

  • Initial release

License

MIT