unplugin-prefetch-dns
v0.1.5
Published
Automatically collect the domain name in the code and insert it into the head of html
Downloads
4
Maintainers
Readme
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
],
},
}