vite-plugin-workcache
v0.0.19
Published
wokerAutoUpdate
Readme
name: Getting Started route: /
vite.config.ts
import {cachePlugin} from 'vite-plugin-workcache';
return {
plugins: [cachePlugin({
scope: '', // servicework scope
// 是否使用缓存
useCache: true, // 开启缓存
versionName: 'version.json', // 版本文件名称
updateTime: ['06:30', '12:30'], // 自动刷新时间
ignoreList: [],
preCache: ['/web/index.html'], // 默认预缓存的文件
tellUser: true, // 是否通知用户
})]
}