fix: 修复config.json被缓存导致变更无法及时更新的问题

config.json的变化不会被webpack感知到,因此不应该被sw缓存
pull/81/head v0.0.11
moonrailgun 3 years ago
parent 8b9a6b274d
commit 96ddcb312a

@ -102,7 +102,7 @@ const plugins: Configuration['plugins'] = [
skipWaiting: true,
// Do not precache images
exclude: [/\.(?:png|jpg|jpeg|svg)$/],
exclude: [/\.(?:png|jpg|jpeg|svg)$/, 'config.json'],
maximumFileSizeToCacheInBytes: 8 * 1024 * 1024, // 限制最大缓存 8M

@ -66,7 +66,7 @@ setGlobalLoading((text) => {
*
*/
request
.get('/config.json', {
.get('/config.json?v2', {
baseURL: '',
})
.then(({ data: config }) => {

Loading…
Cancel
Save