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

@mt-kit/vite-plugins

v1.0.1

Published

Vite plugins

Readme

@mt-kit/vite-plugins

npm version GitHub stars GitHub issues License Documentation

Vite 插件集合,提供库构建、TypeScript 类型生成等常用插件。

安装

npm install @mt-kit/vite-plugins -D

TypeScript 类型生成

注意:直接内嵌到插件,无法使用,待修复。请使用 vite-plugin-dts。

安装:

npm i vite-plugin-dts -D

配置:

import { defineConfig } from "vite";
import dts from "vite-plugin-dts";

export default defineConfig(() => ({
  plugins: [
    dts({
      tsconfigPath: "./tsconfig.json",
      rollupTypes: false,
      strictOutput: true,
      outDir: "dist",
      entryRoot: "./src"
    })
  ]
}));

相关文档: vite-plugin-dts

API

libPlugin

Vite 库构建插件,用于构建可发布的库文件。

参数:

| 属性名 | 说明 | 类型 | 是否必传 | 默认值 | |--------|------|------|----------|--------| | name | UMD 构建使用的全局变量名 | string | 是 | - | | fileName | 打包的文件名 | string | 否 | index | | entry | 入口文件路径 | string | 否 | src/index.ts | | external | 不打入产物的依赖 | Array<string \| RegExp> | 否 | ["path", "vite"] | | globals | UMD 构建中外部依赖对应的全局变量名 | Record<string, string> | 否 | {} |

package.json 配置:

| 字段 | 说明 | 对应文件 | |------|------|----------| | main | CommonJS 规范,也可在浏览器使用全局变量引用 | dist/index.umd.js | | module | ES 模块规范 | dist/index.es.js | | types | 类型声明文件 | dist/index.d.ts | | exports | 多入口条件导出 | 按模块类型映射路径 |

package.json 示例:

{
  "name": "demo",
  "version": "1.0.0",
  "description": "Demo",
  "type": "module",
  "scripts": {
    "clear:build": "rm -fr dist",
    "clear": "rm -fr node_modules && pnpm run clear:build",
    "build": "pnpm run clear:build && vite build",
    "dev": "vite build --watch"
  },
  "main": "dist/index.umd.js",
  "module": "dist/index.es.js",
  "types": "dist/index.d.ts",
  "exports": {
    ".": {
      "types": "./dist/index.d.ts",
      "import": "./dist/index.es.js",
      "require": "./dist/index.umd.js"
    }
  }
}

vite.config.ts 示例:

import { defineConfig } from "vite";
import { libPlugin } from '@mt-kit/vite-plugins';

export default defineConfig({
  plugins: [
    libPlugin({
      name: "Demo"
    })
  ]
});