feat: Update dependencies and import maps

Upgrades React to v19.2.4 and adjusts ESM import maps to ensure correct versioning and loading. Also, removes redundant API key check in geminiService.ts as it's handled at build time.
This commit is contained in:
Philip
2026-01-28 17:45:32 -08:00
parent 7cdd75ea83
commit c8ef03a27b
3 changed files with 8 additions and 12 deletions
+5 -4
View File
@@ -33,7 +33,6 @@
}
</script>
<style>
/* Custom utility for full-screen text handling */
body {
overscroll-behavior: none;
}
@@ -41,10 +40,10 @@
<script type="importmap">
{
"imports": {
"react-dom/": "https://esm.sh/react-dom@^19.2.4/",
"@google/genai": "https://esm.sh/@google/genai@^1.38.0",
"react/": "https://esm.sh/react@^19.2.4/",
"react": "https://esm.sh/react@^19.2.4",
"react-dom/": "https://esm.sh/react-dom@^19.2.4/",
"react/": "https://esm.sh/react@^19.2.4/",
"@google/genai": "https://esm.sh/@google/genai@^1.38.0",
"lucide-react": "https://esm.sh/lucide-react@^0.563.0",
"recharts": "https://esm.sh/recharts@^3.7.0"
}
@@ -53,5 +52,7 @@
</head>
<body>
<div id="root"></div>
<!-- Vite Entry Point - Points to src/index.tsx -->
<script type="module" src="/src/index.tsx"></script>
</body>
</html>
+1 -1
View File
@@ -9,9 +9,9 @@
"preview": "vite preview"
},
"dependencies": {
"react": "^19.2.4",
"react-dom": "^19.2.4",
"@google/genai": "^1.38.0",
"react": "^19.2.4",
"lucide-react": "^0.563.0",
"recharts": "^3.7.0"
},
-5
View File
@@ -2,11 +2,6 @@ import { GoogleGenAI, Type } from "@google/genai";
import { Question } from "../types";
const generateQuestions = async (topic: string, count: number = 5): Promise<Question[]> => {
if (!process.env.API_KEY) {
console.error("API Key is missing");
return [];
}
const ai = new GoogleGenAI({ apiKey: process.env.API_KEY });
try {