0.0.10 • Published 11 months ago

vite-plugin-prefetch-dns v0.0.10

Weekly downloads
-
License
MIT
Repository
github
Last release
11 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

11 months ago

0.0.5

11 months ago

0.0.4

11 months ago

0.0.3

11 months ago

0.0.2

11 months ago

0.0.1

11 months ago