@twaves/vite-inject-html-hash
v1.0.1
Published
vite插件,给index.html插入hash值
Downloads
3
Readme
vite-inject-html-hash
1. 安装
npm install @twaves/vite-inject-html-hash --save-dev
2. 引入包
import viteInjectHtmlHash from "@twaves/vite-inject-html-hash";
3. vite.config.js
plugins: [
vue(),
// ...其他配置
viteInjectHtmlHash(),
];
4. 生成
<html>
<body>
<!-- 其他DOM结构 -->
<!-- index.html会多下面内容,格式:hash_时间戳 -->
<!-- 3ea9c29b015b4abb1463_1717079526707 -->
</body>
</html>