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

@rakit/conf

v1.2.4

Published

Rakit shared configuration for Vue 3 projects

Downloads

72

Readme

@rakit/conf

Vue 3 项目的共享配置库,提供 Vite 构建配置和 TypeScript 配置模板。

📦 安装

pnpm add @rakit/conf -D

注意: 本项目强制使用 pnpm 作为包管理器

🚀 快速开始

Vite 配置

在你的 vite.config.ts 中使用:

import { defineConfig } from "@rakit/conf"

export default defineConfig({
  root: import.meta.dirname,
  
  plugins: {
    vue: true,
    unocss: true,
    autoImport: true,
    components: true,
    dts: true
  },
  
  build: {
    mode: "APP" // 或 "LIB"
  }
})

TypeScript 配置

在你的 tsconfig.json 中继承:

{
  "extends": "@rakit/conf/tsconfig/app.json",
  "compilerOptions": {
    "paths": {
      "@/*": ["./src/*"]
    }
  }
}

📚 配置选项

插件配置

| 插件 | 类型 | 说明 | |------|------|------| | vue | boolean | Vue 3 单文件组件支持 | | unocss | boolean \| "screen" | UnoCSS 原子化 CSS | | autoImport | boolean \| string[] | API 自动导入 | | components | boolean | 组件自动注册 | | dts | boolean | TypeScript 声明文件生成 |

构建配置

| 选项 | 值 | 说明 | |------|-----|------| | mode | "APP" | 应用模式构建 | | mode | "LIB" | 库模式构建 |

🎯 TypeScript 配置模板

应用项目配置

{
  "extends": "@rakit/conf/tsconfig/app.json"
}

库项目配置

{
  "extends": "@rakit/conf/tsconfig/library.json"
}

🛠️ 特性

  • 开箱即用:预配置常用插件和选项
  • TypeScript 优先:完整的类型支持
  • 模块化设计:按需启用插件
  • 双模式构建:支持应用和库两种构建模式
  • 标准化配置:项目配置的一致性和最佳实践

📖 详细文档

自定义插件配置

export default defineConfig({
  plugins: {
    vue: true,
    unocss: "screen", // 屏幕适配配置
    autoImport: ["lodash-es", "dayjs"], // 额外的自动导入
    components: true,
    dts: true
  }
})

构建配置示例

// 应用构建
export default defineConfig({
  build: {
    mode: "APP",
    distPath: "dist"
  }
})

// 库构建
export default defineConfig({
  build: {
    mode: "LIB",
    distPath: "lib"
  }
})

🔧 依赖要求

对等依赖

  • vue ^3.0.0
  • naive-ui ^2.0.0
  • vite ^6.0.0

自动包含的插件

  • @vitejs/plugin-vue
  • unocss/vite
  • unplugin-auto-import
  • unplugin-vue-components
  • vite-plugin-dts

📄 许可证

MIT