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

tiny-vite

v3.0.0

Published

<img src="./assets/logo.png" />

Readme

tiny-vite

简体中文 | English

⚡️ a lightweight frontend build tool designed to deliver swift development experiences and efficient build processes。基于 Rolldown 统一引擎,告别开发/生产不一致问题。支持 ModuleGraph,HMR,插件架构,单文件编译,代码压缩

架构演进

从双引擎到 Rolldown

原版 Vite 采用双引擎架构

  • 开发环境:esbuild 进行依赖预构建(快速冷启动)
  • 生产环境:Rollup 进行打包(成熟的插件生态,tree-shaking)

这种架构存在一个根本性问题:开发/生产不一致。由于使用不同的打包器,同样的代码在开发和生产环境可能表现不同。

tiny-vite 已迁移至 Rolldown - 一个基于 Rust 的打包工具,旨在统一开发和生产构建:

┌─────────────────────────────────────────────────────────────┐
│                     tiny-vite v2.x                          │
├─────────────────────────────────────────────────────────────┤
│                                                             │
│   开发环境              生产环境                              │
│   ┌─────────┐         ┌─────────┐                          │
│   │ Rolldown│         │ Rolldown│                          │
│   │  扫描   │         │  构建   │                           │
│   │ 预构建  │         │         │                           │
│   └─────────┘         └─────────┘                          │
│        │                   │                                │
│        └───────┬───────────┘                                │
│                │                                            │
│           同一引擎                                           │
│           行为一致                                           │
│                                                             │
└─────────────────────────────────────────────────────────────┘

Rolldown 的优势

  • 统一引擎:开发和生产使用同一打包器,消除不一致性
  • Rust 性能:扫描和打包都接近原生速度
  • Rollup 兼容:支持大部分 Rollup 插件
  • 内置特性:原生支持 TypeScript、JSX 转换

功能特性

  • ⚡️ 快速的开发服务器:使用内置的开发服务器,实现热模块替换(HMR)和快速重载,加速开发流程。
  • 🚀 即时编译:利用现代浏览器的 ES 模块特性,避免打包步骤,实现按需编译和加载,减少开发时间。
  • 📝 简化的配置:仅需一个配置文件,即可快速启动项目,无需繁琐的配置过程。
  • 🎉 轻量级:精简了复杂的功能,保持核心特性,使工具更加轻盈。
  • 🦀 Rolldown 驱动:统一的 Rust 打包器,同时服务于开发和生产环境。

进展

  • [x] 构建脚本
  • [x] 脚手架 CLI
  • [x] 静态文件中间件
  • [x] http 服务器
  • [x] 依赖预构建:依赖扫描、依赖构建、修改导入路径
  • [x] 插件机制:插件容器对象,插件上下文对象
  • [x] 核心编译能力:入口 html 加载、TS/TSX/JS/JSX 编译、CSS 编译、静态资源加载
  • [x] HMR:模块依赖图、HMR 服务器、HMR 客户端
  • [x] 生产构建:rolldown 打包、CSS 提取、资源处理
  • [x] 支持 vue 插件
  • [x] 支持 style
  • [x] 支持环境变量

安装方法

在开始之前,请确保你的环境已经安装了 Node.js。

通过以下步骤安装 tiny-vite:

  1. 全局安装 tiny-vite
npm install -g tiny-vite
  1. 进入你的项目目录
mkdir my-app
cd my-app
  1. 初始化项目(生成配置文件和必要的目录结构)
tiny-vite init
  1. 启动开发服务器:
tiny-vite dev
  1. 生产构建:
tiny-vite build

许可证

MIT