From c493a8303bbcb935d399e19e9e1cf749f7697394 Mon Sep 17 00:00:00 2001 From: German Khokhlov Date: Fri, 16 Oct 2026 23:18:33 +0400 Subject: [PATCH] build: the QA fixture sources stay out of production builds The ?qaFeed import is now gated by import.meta.env.DEV at its import site, so Rollup drops the qaSources chunk (4.7 KB) from production builds instead of shipping it unreachable. Dev behaviour is unchanged. (T8-T9 review item 3) --- src/standalone/application.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/standalone/application.js b/src/standalone/application.js index bda125fa2..6cf95e771 100644 --- a/src/standalone/application.js +++ b/src/standalone/application.js @@ -68,8 +68,12 @@ export function createStandaloneApplication({ // kept for links. // QA fixture sources (?qaFeed=…) on the dev server only. const search = globalThis.location?.search ?? ''; + // import.meta.env.DEV at the import site, so production builds drop + // the chunk instead of shipping it unreachable. const qaSources = - allowQaRegistration && /[?&]qaFeed=/.test(search) + import.meta.env?.DEV && + allowQaRegistration && + /[?&]qaFeed=/.test(search) ? await import('../app/layers/qaSources.js').then( ({ createQaSources, parseQaFeed }) => createQaSources(parseQaFeed(search)),