diff --git a/web/build/webpack.config.ts b/web/build/webpack.config.ts index c34d8dad..e8eae77c 100644 --- a/web/build/webpack.config.ts +++ b/web/build/webpack.config.ts @@ -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 diff --git a/web/src/init.tsx b/web/src/init.tsx index 2e904c70..b31d0665 100644 --- a/web/src/init.tsx +++ b/web/src/init.tsx @@ -66,7 +66,7 @@ setGlobalLoading((text) => { * 获取前端配置 */ request - .get('/config.json', { + .get('/config.json?v2', { baseURL: '', }) .then(({ data: config }) => {