Port admin-web's chunk-reload guard to ops-web (vite:preloadError + router.onError) so a stale tab landing on a lazy-loaded route triggers a single reload instead of a hard 404. Also force index.html through revalidation on both apps so the reload actually fetches a fresh entry referencing the new chunk hashes; hashed asset URLs keep their long immutable cache. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -36,6 +36,7 @@ import {
|
||||
} from 'ant-design-vue'
|
||||
import { createApp } from 'vue'
|
||||
|
||||
import { registerChunkReloadHandlers } from '@/lib/chunk-reload'
|
||||
import { bindUnauthorizedHandler } from '@/lib/http'
|
||||
import { router } from '@/router'
|
||||
import { useAuthStore } from '@/stores/auth'
|
||||
@@ -44,6 +45,8 @@ import 'ant-design-vue/dist/reset.css'
|
||||
import App from './App.vue'
|
||||
import './styles.css'
|
||||
|
||||
registerChunkReloadHandlers()
|
||||
|
||||
const queryClient = new QueryClient({
|
||||
defaultOptions: {
|
||||
queries: {
|
||||
|
||||
Reference in New Issue
Block a user