Skip to content

jianxing-xu/unplugin-dns-prefetch

Repository files navigation

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
    ],
  },
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published