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

gd-vite-core

v1.0.12

Published

广达 Vue3 后台管理模板脚手架

Readme

gd-vite-core

广达 Vue3 后台管理模板脚手架

安装

pnpm add gd-vite-core -D
# 或
npm install gd-vite-core -D

使用

1. 创建 vite.config.ts

import scaffold from 'gd-vite-core';

export default scaffold.vite();

2. 配置 AntDesign 按需引入

import scaffold from 'gd-vite-core';
import Components from 'unplugin-vue-components/vite';
import { AntDesignVueResolver } from 'unplugin-vue-components/resolvers';

export default scaffold.vite({
  plugins: [
    Components({
      resolvers: [
        AntDesignVueResolver({
          importStyle: false, // css in js
        }),
      ],
    }),
  ],
});

3. 配置外部脚本(CDN)

export default scaffold.vite({
  scripts: [
    'https://cdn.bootcdn.net/ajax/libs/vue/3.4.0/vue.global.prod.min.js',
    'https://cdn.bootcdn.net/ajax/libs/ant-design-vue/4.2.0/ant-design.min.js',
  ],
});

4. 配置开发服务器

可以自定义开发服务器端口、host、自动打开浏览器等配置:

export default scaffold.vite({
  server: {
    port: 5173, // 自定义端口,默认 5173
    host: true, // 允许局域网访问,默认 '0.0.0.0'
    open: true, // 启动后自动打开浏览器,默认 false
    cors: true // 开启跨域支持,默认 true
  },
});

5. 配置代理

export default scaffold.vite({
  proxy: {
    myApi: 'http://localhost:8080/api',
  },
});

API

scaffold.vite(options?)

| 参数 | 类型 | 说明 | |------|------|------| | plugins | Plugin[] | Vite 插件配置,会追加到默认插件后面 | | server | object | 开发服务器配置 | | proxy | object | 代理配置 | | root | string | 源码目录,默认 src | | scripts | string[] | 外部脚本 URL,会注入到 HTML <head> | | enableConfigInject | boolean | 是否启用 app.config.js 注入,默认 true |

导出

export { proxy, getProxyKeys, getProxyTarget } from 'gd-vite-core';
export { defaultServerConfig, getServerConfig } from 'gd-vite-core';
export { alias, srcPath, rootPath } from 'gd-vite-core';
export { getVuePlugin, getRequireTransformPlugin } from 'gd-vite-core';

默认插件

  • @vitejs/plugin-vue - Vue3 支持
  • vite-plugin-require-transform - require 语法转换
  • config-inject-plugin - app.config.js 运行时配置注入