mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 19:04:02 +00:00
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)
This commit is contained in:
1 parent
bf46eb6d97
commit
c493a8303b
1 file changed
+5
-1
@@ -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)),
|
||||
|
||||
Reference in new issue
Block a user