unplugin-prefetch-dns
TypeScript icon, indicating that this package has built-in type declarations

0.1.5 • Public • Published

unplugin-dns-prefetch

Automatically collect the domain name in the code and insert it into the head of html

Usage

Vite

// vite.config.ts
import { defineConfig } from 'vite'
import dnsPrefetchPlugin from 'unplugin-prefetch-dns/vite'
import vue from '@vitejs/plugin-vue'
import type { PluginOption } from 'vite'
export default defineConfig({
  plugins: [
    vue(),
    dnsPrefetchPlugin(),
  ],
})

Webpack

// webpack.config.js
module.exports = {
  plugins: [
    require('unplugin-prefetch-dns/webpack').default,
  ],
}

Vue CLI

// vue.config.js
module.exports = {
  configureWebpack: {
    plugins: [
      require('unplugin-prefetch-dns/webpack').default
    ],
  },
}

Package Sidebar

Install

npm i unplugin-prefetch-dns

Weekly Downloads

0

Version

0.1.5

License

MIT

Unpacked Size

46.9 kB

Total Files

42

Last publish

Collaborators

  • jianxing