From d5a2945d2db13bc2ba1b64b179519d2e549c10a2 Mon Sep 17 00:00:00 2001
From: David Lyon <5115845+dauglyon@users.noreply.github.com>
Date: Thu, 15 Jan 2026 20:32:41 -0800
Subject: [PATCH 01/21] Add Vite configuration files
- vite.config.ts: Vite config with React plugin, SVGR, proxy for
/services, Vitest config, and browser targets
- tsconfig.node.json: TypeScript config for Vite config file
- src/vite-env.d.ts: Type declarations for Vite env vars and
vitest-fetch-mock globals
---
src/vite-env.d.ts | 24 ++++++++++++++++++++++++
tsconfig.node.json | 11 +++++++++++
vite.config.ts | 44 ++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 79 insertions(+)
create mode 100644 src/vite-env.d.ts
create mode 100644 tsconfig.node.json
create mode 100644 vite.config.ts
diff --git a/src/vite-env.d.ts b/src/vite-env.d.ts
new file mode 100644
index 00000000..82e2d9cf
--- /dev/null
+++ b/src/vite-env.d.ts
@@ -0,0 +1,24 @@
+///
+///
+
+import type { FetchMock } from 'vitest-fetch-mock';
+
+declare global {
+ // eslint-disable-next-line no-var
+ var fetchMock: FetchMock;
+}
+
+interface ImportMetaEnv {
+ readonly VITE_KBASE_ENV: string;
+ readonly VITE_KBASE_DOMAIN: string;
+ readonly VITE_KBASE_LEGACY_DOMAIN: string;
+ readonly VITE_KBASE_CDM_DOMAIN: string;
+ readonly VITE_KBASE_BACKUP_COOKIE_NAME: string;
+ readonly VITE_KBASE_BACKUP_COOKIE_DOMAIN: string;
+ readonly VITE_COMMIT: string;
+ readonly BASE_URL: string;
+}
+
+interface ImportMeta {
+ readonly env: ImportMetaEnv;
+}
diff --git a/tsconfig.node.json b/tsconfig.node.json
new file mode 100644
index 00000000..14f2d045
--- /dev/null
+++ b/tsconfig.node.json
@@ -0,0 +1,11 @@
+{
+ "compilerOptions": {
+ "composite": true,
+ "skipLibCheck": true,
+ "module": "ESNext",
+ "moduleResolution": "node",
+ "allowSyntheticDefaultImports": true,
+ "strict": true
+ },
+ "include": ["vite.config.ts"]
+}
diff --git a/vite.config.ts b/vite.config.ts
new file mode 100644
index 00000000..2300d7ac
--- /dev/null
+++ b/vite.config.ts
@@ -0,0 +1,44 @@
+///
+import { defineConfig } from 'vite';
+import react from '@vitejs/plugin-react';
+import svgr from 'vite-plugin-svgr';
+
+export default defineConfig({
+ plugins: [react(), svgr()],
+ base: process.env.VITE_BASE_URL || '/',
+ server: {
+ port: 3000,
+ proxy: {
+ '/services': {
+ target: 'https://ci-europa.kbase.us',
+ changeOrigin: true,
+ secure: true,
+ },
+ },
+ },
+ build: {
+ outDir: process.env.BUILD_PATH || 'build',
+ // Browser support: last 1 version of Chrome, Firefox, Safari, Edge
+ // Query: npx browserslist "last 1 chrome version, last 1 firefox version, last 1 safari version, last 1 edge version"
+ target: ['chrome143', 'firefox146', 'safari18', 'edge143'],
+ },
+ define: {
+ // For libraries that check process.env
+ 'process.env': {},
+ },
+ test: {
+ globals: true,
+ environment: 'jsdom',
+ environmentOptions: {
+ jsdom: {
+ url: 'http://localhost/',
+ },
+ },
+ setupFiles: './src/setupTests.ts',
+ css: {
+ modules: {
+ classNameStrategy: 'non-scoped',
+ },
+ },
+ },
+});
From 40d237922ae0273aabca863ec2048f07328d2796 Mon Sep 17 00:00:00 2001
From: David Lyon <5115845+dauglyon@users.noreply.github.com>
Date: Thu, 15 Jan 2026 20:33:48 -0800
Subject: [PATCH 02/21] Move index.html from public/ to project root
Vite expects index.html at the root instead of in public/.
Added script tag for src/index.tsx entry point.
---
public/index.html => index.html | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
rename public/index.html => index.html (95%)
diff --git a/public/index.html b/index.html
similarity index 95%
rename from public/index.html
rename to index.html
index a63cf9bd..41507de4 100644
--- a/public/index.html
+++ b/index.html
@@ -10,7 +10,7 @@
gtag('config', 'G-KXZCE6YQFZ', { send_page_view: false });
-
+
@@ -35,5 +35,6 @@
+