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

@break_happy/create-dual-vite

v0.1.4

Published

Create a dual-target Vite React application for web and file-local runtimes.

Readme

@break_happy/create-dual-vite

DualVite 是一个基于 React + TypeScript 的应用开发脚手架,支持 Web 部署与本地文件 / Electron 渲染进程双目标构建。

采用 Vite 8 + Rolldown + Oxc 构建工具链,集成 TanStack Router / Query、Zustand 和 Ant Design,提供路由、状态管理、应用布局及统一请求层,为业务开发提供可扩展的基础结构。

技术栈

| 层级 | 技术方案 | 职责 | | ---------- | ------------------ | ------------------------------------------------- | | 应用开发 | React + TypeScript | 组件化开发与静态类型检查 | | 开发与构建 | Vite 8 + Rolldown | 开发服务器、依赖预打包与生产打包 | | 编译转换 | Oxc | TS/JSX 转换、React Refresh 转换与 JavaScript 压缩 | | 路由管理 | TanStack Router | 类型安全的文件路由与嵌套布局 | | 服务端状态 | TanStack Query | 异步数据获取、缓存与更新 | | 客户端状态 | Zustand | 全局 UI 状态、主题与认证状态管理 | | UI 与布局 | Ant Design | UI 组件、应用布局、侧边导航与明暗主题 | | HTTP 请求 | Axios | 统一请求封装、认证令牌注入与错误处理 |

双目标构建

同一套应用代码支持两种构建目标:

  • Web:使用 Browser History 路由,支持配置部署路径前缀。
  • 本地文件 / Electron 渲染进程:使用 Hash History 路由与相对资源路径,支持通过 loadFile() 加载构建产物。

构建工具链

开发阶段的依赖预打包与生产打包统一使用 Rolldown,TS/JSX 转换、React Refresh 转换及 JavaScript 压缩由 Oxc 完成。开发模式保留 Vite 默认的按需模块加载机制,类型检查通过 pnpm check 独立执行。

TanStack 路由工具和 React Hooks ESLint 规则仍包含间接 Babel 依赖;Vite / React 的编译转换链路已使用 Oxc。

pnpm create @break_happy/dual-vite my-app

Commands in a generated project

pnpm dev
pnpm build:web
pnpm build:filelocal
pnpm lint