Files
canina/frontend/admin-panel/src/main.tsx
T
devops ddbf1ca026
Deploy Canina / deploy (push) Successful in 4m1s
E2E Playwright Tests / Run Full E2E & Security Suites (push) Failing after 7s
test: comprehensive test suites and quality gates pass across backend, storefront and admin
- Backend (NestJS): 82 suites, 641 tests passing; 0 ESLint errors; 0 tsc errors. Hardened SSL cert/key matching, SSRF IP pinning, and eBank validation.
- Admin Panel (Vite/React): 48 suites, 300 tests passing; 0 ESLint errors; 0 tsc errors. Full coverage across all pages and settings.
- Storefront (Next.js): 62 suites, 368 tests passing; 0 ESLint errors; 0 tsc errors.
- Fixed unmount lifecycle guards, promise error handling, and component edge cases.
2026-10-13 16:01:00 +00:00

34 lines
1.0 KiB
TypeScript

import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';
import App from './App.tsx';
import './index.css';
// Handle Vite dynamic import chunk mismatch after fresh deployment
window.addEventListener('vite:preloadError', (event) => {
event.preventDefault();
console.warn('[Vite] Preload error detected, reloading to fetch latest bundle...');
window.location.reload();
});
window.addEventListener('error', (e) => {
const msg = e.message || '';
if (
msg.includes('Failed to fetch dynamically imported module') ||
msg.includes('Importing a module script failed') ||
msg.includes('error loading dynamically imported module')
) {
const lastReload = sessionStorage.getItem('vite_chunk_error_reload');
const now = Date.now();
if (!lastReload || now - parseInt(lastReload, 10) > 8000) {
sessionStorage.setItem('vite_chunk_error_reload', String(now));
window.location.reload();
}
}
});
createRoot(document.getElementById('root')!).render(
<StrictMode>
<App />
</StrictMode>,
)