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

zglpack

v0.0.6

Published

一个基于 [Rspack](https://www.rspack.dev/) 的现代化打包工具,专为 React 和 Vue 项目设计。

Readme

zglpack

一个基于 Rspack 的现代化打包工具,专为 React 和 Vue 项目设计。

特性

  • 零配置启动:预设了常用的打包配置,开箱即用
  • 智能项目检测:自动识别 React/Vue 项目类型并应用相应配置
  • 多格式支持:支持打包为 CommonJS、ES Module 和 UMD 格式
  • 按需导入:库模式下支持按需导入组件
  • 样式隔离:内置 CSS Modules 支持,避免样式冲突
  • 开发服务器:内置开发服务器,支持热更新
  • 代码分割:自动代码分割,优化加载性能
  • 资源优化:图片、字体等资源自动处理和优化

安装

npm install -g zglpack

使用

开发模式

启动开发服务器:

zgl dev

选项:

  • -p, --port <port>: 指定端口号,默认 3000
  • -o, --open: 自动打开浏览器

生产构建

打包项目:

zgl build

选项:

  • -m, --mode <mode>: 构建模式,默认 production
  • -l, --lib: 以库模式构建

配置

自定义配置

可以通过创建 zgl.config.jszgl.config.ts 文件来自定义配置:

// zgl.config.js
import { defineConfig } from 'zglpack';
export default defineConfig({
  // 自定义配置项
  devServer: {
    port: 8080
  }
});

自定义配置会与默认配置进行合并。

库模式

在库模式下,会根据 package.json 的配置自动确定打包格式:

{
  "name": "my-library",
  "type": "module",
  "exports": {
    ".": {
      "import": "./dist/esm/index.js",
      "require": "./dist/cjs/index.js"
    }
  }
}

支持的文件类型

  • JavaScript/JSX
  • TypeScript/TSX
  • CSS/SCSS/LESS
  • 图片资源 (png, jpg, gif, svg)
  • 字体文件 (woff, woff2, eot, ttf, otf)
  • 音视频文件 (mp4, webm, ogg, mp3, wav, flac, aac)

样式隔离

支持 CSS Modules,通过命名约定自动启用:

  • *.module.css
  • *.module.scss
  • *.module.less
/* Button.module.css */
.button {
  background: blue;
  color: white;
}
import styles from './Button.module.css';

function Button() {
  return <button className={styles.button}>Click me</button>;
}