【发布时间】:2020-07-22 00:40:53
【问题描述】:
我正在使用 npm grunt-cache-bust 来缓存静态文件。
我有以下文件夹结构
- app
- scripts
- app.js
- app.config.js
- controllers
- controller1.js
- controller12.js
- index.html
- Gruntfile.js
在 gruntfile.js 我添加了基本配置
cacheBust: {
taskName: {
options: {
assets: ['dist/scripts/**'],
jsonOutput: true,
createCopies: true,
deleteOriginals: false
},
src: ['dist/index.html',]
}
}
它破坏了 src 中给出的文件,但不替换 index.html 中的引用
我有什么遗漏吗?
【问题讨论】:
标签: angular caching npm gruntjs browser-cache