From 1ac214a1cdd1d5f13708191fa660ac9f19a17448 Mon Sep 17 00:00:00 2001 From: Christian Byrne Date: Thu, 29 Jan 2026 21:06:30 -0800 Subject: [PATCH] docs: add Vite preload error handling documentation comment (#8475) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Add documentation comment explaining the Vite preload error handler with a link to official documentation. ## Changes - **What**: Added a 2-line comment above the `vite:preloadError` event listener in App.vue explaining its purpose and linking to https://vite.dev/guide/build#load-error-handling Fixes COM-14132 ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8475-docs-add-Vite-preload-error-handling-documentation-comment-2f86d73d3650815f9731f30bd9c5eb57) by [Unito](https://www.unito.io) Co-authored-by: Amp --- src/App.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/App.vue b/src/App.vue index 7c11c4c7be..f843a73470 100644 --- a/src/App.vue +++ b/src/App.vue @@ -46,6 +46,8 @@ onMounted(() => { document.addEventListener('contextmenu', showContextMenu) } + // Handle preload errors that occur during dynamic imports (e.g., stale chunks after deployment) + // See: https://vite.dev/guide/build#load-error-handling window.addEventListener('vite:preloadError', (event) => { event.preventDefault() // eslint-disable-next-line no-undef