feat: Update dependencies and import maps
Revises project dependencies and CDN import maps to align with latest stable versions. This includes updating React, Vite, and related plugins to their respective recent releases, ensuring better performance and access to new features. The `vite.config.ts` has been simplified by removing environment variable loading and path aliasing, as these are now handled implicitly or are no longer required with the updated Vite configuration.
This commit is contained in:
16
index.html
16
index.html
@@ -95,19 +95,19 @@
|
|||||||
<script type="importmap">
|
<script type="importmap">
|
||||||
{
|
{
|
||||||
"imports": {
|
"imports": {
|
||||||
"react": "https://esm.sh/react@18.2.0",
|
"react": "https://aistudiocdn.com/react@^19.2.1",
|
||||||
"react-dom": "https://esm.sh/react-dom@18.2.0",
|
|
||||||
"react-dom/client": "https://esm.sh/react-dom@18.2.0/client",
|
|
||||||
"react/jsx-runtime": "https://esm.sh/react@18.2.0/jsx-runtime",
|
|
||||||
"framer-motion": "https://esm.sh/framer-motion@10.16.4?external=react,react-dom",
|
|
||||||
"lucide-react": "https://esm.sh/lucide-react@0.292.0?external=react,react-dom",
|
|
||||||
"react-dom/": "https://aistudiocdn.com/react-dom@^19.2.1/",
|
"react-dom/": "https://aistudiocdn.com/react-dom@^19.2.1/",
|
||||||
"react/": "https://aistudiocdn.com/react@^19.2.1/"
|
"react/": "https://aistudiocdn.com/react@^19.2.1/",
|
||||||
|
"@vitejs/plugin-react": "https://aistudiocdn.com/@vitejs/plugin-react@^5.1.2",
|
||||||
|
"vite": "https://aistudiocdn.com/vite@^7.2.7",
|
||||||
|
"lucide-react": "https://aistudiocdn.com/lucide-react@^0.556.0",
|
||||||
|
"framer-motion": "https://aistudiocdn.com/framer-motion@^12.23.25"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
|
<script type="module" src="/index.tsx"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
20
package.json
20
package.json
@@ -1,23 +1,23 @@
|
|||||||
{
|
{
|
||||||
"name": "m5rcel-portfolio",
|
"name": "m5rcel-portfolio",
|
||||||
|
"version": "1.0.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.0.0",
|
|
||||||
"type": "module",
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
"preview": "vite preview"
|
"preview": "vite preview"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"react": "^19.2.1",
|
"framer-motion": "^10.16.4",
|
||||||
"react-dom": "^19.2.1",
|
"lucide-react": "0.292.0",
|
||||||
"framer-motion": "10.16.4",
|
"react": "^18.2.0",
|
||||||
"lucide-react": "0.292.0"
|
"react-dom": "^18.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^22.14.0",
|
"@types/react": "^18.2.0",
|
||||||
"@vitejs/plugin-react": "^5.0.0",
|
"@types/react-dom": "^18.2.0",
|
||||||
"typescript": "~5.8.2",
|
"@vitejs/plugin-react": "^4.2.0",
|
||||||
"vite": "^6.2.0"
|
"typescript": "^5.0.0",
|
||||||
|
"vite": "^5.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,23 +1,6 @@
|
|||||||
import path from 'path';
|
import { defineConfig } from 'vite';
|
||||||
import { defineConfig, loadEnv } from 'vite';
|
|
||||||
import react from '@vitejs/plugin-react';
|
import react from '@vitejs/plugin-react';
|
||||||
|
|
||||||
export default defineConfig(({ mode }) => {
|
export default defineConfig({
|
||||||
const env = loadEnv(mode, '.', '');
|
|
||||||
return {
|
|
||||||
server: {
|
|
||||||
port: 3000,
|
|
||||||
host: '0.0.0.0',
|
|
||||||
},
|
|
||||||
plugins: [react()],
|
plugins: [react()],
|
||||||
define: {
|
|
||||||
'process.env.API_KEY': JSON.stringify(env.GEMINI_API_KEY),
|
|
||||||
'process.env.GEMINI_API_KEY': JSON.stringify(env.GEMINI_API_KEY)
|
|
||||||
},
|
|
||||||
resolve: {
|
|
||||||
alias: {
|
|
||||||
'@': path.resolve(__dirname, '.'),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
});
|
});
|
||||||
Reference in New Issue
Block a user