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

fe-stack

v0.0.20

Published

共享的配置文件集合,用于 Vite、Tailwind、Biome、Prettier 和 TypeScript

Readme

fe-stack

一个包含 Vite、Tailwind、Biome、Prettier 和 TypeScript 配置的共享包,可以在多个项目中复用。

安装方法

在项目中安装:

pnpm add -D fe-stack

使用方法

1. Biome 配置

在项目中创建 biome.json 继承:

{
  "extends": ["fe-stack/biome.json"]
}

2. Prettier 配置

在项目根目录创建 .prettierrc.json

"fe-stack/prettier.json"

或者:

{
  "extends": "fe-stack/prettier.json"
}

3. Tailwind 配置

在项目中创建 tailwind.config.js

import baseConfig from 'fe-stack/tailwind.config.js';

export default {
  ...baseConfig,
  // 项目特定的覆盖配置
  theme: {
    extend: {
      ...baseConfig.theme?.extend,
      // 你的自定义主题
    },
  },
};

4. TypeScript 配置

tsconfig.json(Vue 应用):

{
  "files": [],
  "references": [
    { "path": "./tsconfig.app.json" },
    { "path": "./tsconfig.node.json" }
  ]
}

tsconfig.app.json

{
  "extends": "fe-stack/tsconfig.app.json",
  "compilerOptions": {
    "baseUrl": ".",
    "paths": {
      "@/*": ["./src/*"]
    }
  },
  "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"]
}

tsconfig.node.json

{
  "extends": "fe-stack/tsconfig.node.json",
  "include": ["vite.config.*"]
}

5. Vite 配置

Vue 应用模式

import { createBaseConfig } from 'fe-stack/vite.config.base';

export default createBaseConfig(import.meta.dirname, {
  viteConfig: {
    server: {
      port: 5173,
      proxy: {
        '/api': {
          target: 'http://your-api-server',
          changeOrigin: true,
        }
      }
    }
  }
});

Lib 打包模式

import { createBaseConfig } from 'fe-stack/vite.config.base';

export default createBaseConfig(import.meta.dirname, {
  mode: 'lib',
  dtsConfig: {
    // 自定义 vite-plugin-dts 配置
    exclude: ['**/*.test.ts', '**/*.spec.ts'],
    insertTypesEntry: true,
  },
  viteConfig: {
    build: {
      lib: {
        entry: './src/index.ts',
        name: 'MyLib',
        fileName: 'index',
      },
    },
  },
});

特性:

  • ✅ 完整的 TypeScript 类型支持
  • ✅ 使用 mergeConfig 优雅合并配置
  • dtsConfig 直接配置 dts 插件选项
  • ✅ lib 模式自动配置 vite-plugin-dts
  • ✅ 默认打包为 ESM 格式