0.0.10 • Published 12 months ago

vite-plugin-prefetch-dns v0.0.10

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

vite-plugin-prefetch-dns

A plugin for adding prefetch dns to Vite for personal use!

Features

  • 忽略特定域名
  • 添加pre-connect域名
  • 继承prettier格式化输出index.html
  • 添加最大限制prefetch-dns的个数(按照使用次数排序从多到少)
  • [] 添加阈值
interface DnsPluginOption {
  /**
   * @description: 需要忽略的域名
   */
  ignores?: string[];
  /**
   * @description: 需要预连接的域名
   */
  preConnect?: string[] | string;
  /**
   * @description: prettier 配置
   */
  prettier?: Omit<Options, "parser">;
  /**
   * @description: 最大prefetch-dns次数
   */
  limit?: number;
   /**
   * @description: 阈值:当依赖的域名超过次数时才会被添加
   */
  threshold?: number
}

DnsPluginOption.prettier see prettier Doc

0.0.10

12 months ago

0.0.5

12 months ago

0.0.4

12 months ago

0.0.3

12 months ago

0.0.2

12 months ago

0.0.1

12 months ago