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

unplugin-package

v1.3.0

Published

Bundler plugins for copying manifest files into output.

Readme

Unplugin Package

English | 中文简体

用于将静态资源文件从根目录复制到输出目录的通用插件(unplugin),常用于打包和发布NPM库时将所有需要打包的内容输出到Git忽略的输出目录,以避免复杂的.npmignore等配置的使用场景,也适合用于精简VSCode等扩展的打包体积。

使用方法

  1. 此库仅支持ESModule(esm),不支持CommonJS(cjs)。
  2. 具体配置直接读相关文档注释。本库很简单,推荐直接读源码。
  3. 可参考example目录下的例子。
import unpluginPackage from "unplugin-package"

unpluginPackage.vite() // 作为vite插件使用
unpluginPackage.rollup() // 作为rollup插件使用
unpluginPackage.rolldown() // 作为rolldown插件使用
unpluginPackage.webpack() // 作为webpack插件使用
unpluginPackage.rspack() // 作为rspack插件使用
unpluginPackage.esbuild() // 作为esbuild插件使用
unpluginPackage.farm() // 作为farm插件使用

举例说明

import { join } from "node:path"

const root = import.meta.dirname
const outdir = join(root, "out")

// 将这里的xxx替换为具体的bundler名称,如vite、rollup、rolldown等。
unpluginPackage.xxx({
  root,
  outdir,
  emptyOutdir: true,
  copyFiles: [...defaultFilesToCopy, "addition-file", "not-exist-file"],
  manifestOverride(raw) {
    const manifest = defaultManifestOverride(raw)
    manifest["homepage"] = "https://yourproject.example.com/xxx"
    return manifest
  },
})

开源协议

本库以MIT许可证木兰宽松许可证开源。