vite-plugin-dns-prefetch-super

A vite plugin for dns prefetch


Keywords
vite, plugin, dns, dns-prefetch
License
MIT
Install
npm install vite-plugin-dns-prefetch-super@1.2.4

Documentation

vite-plugin-dns-prefetch-super

Description

A Vite plugin to add dns-prefetch link tag in HTML.

How to use

Install

pnpm install vite-plugin-dns-prefetch-super -D
or yarn add vite-plugin-dns-prefetch-super -D
or npm install vite-plugin-dns-prefetch-super -D

Vite config

import { defineConfig } from 'vite'
import VitePluginDnsPrefetchSuper from 'vite-plugin-dns-prefetch-super'

export default defineConfig({
  plugins: [
    VitePluginDnsPrefetchSuper({
      limit: 20, // limit the max dns count, default 20
      excludeDnsPrefetchUrl: [], // exclude urls  default []
      includeDnsPrefetchUrl: [] // include urls  default []
    })
  ],
})