3.0.0 • Published 1 year ago

webpack-dns-prefetch v3.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

简介

用于自动收集代码中的域名将其预加载,以提高页面加载速度。

安装

npm install webpack-dns-prefetch --save-dev

使用

// package.json 新增命令

"scripts": {
  "prefetch": "webpack-dns-prefetch",
}

配置项

root 是需要预加载 html 的目录,收集的是执行命令的目录 + root 下的所有 html 文件。 exclude 是需要排除域名,不区分大小写,只要是字符串都可以,匹配到部分也会被排除

例: exclude:"baidu","google","qq.com"

{
    "root":"/dist",
    "exclude":[]
}
3.0.0

1 year ago

2.0.0

1 year ago

1.0.0

1 year ago

0.2.0

1 year ago

0.1.0

1 year ago