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:
18
index.html
18
index.html
@@ -92,22 +92,22 @@
|
||||
text-shadow: 0 -1px 0 rgba(0,0,0,0.6);
|
||||
}
|
||||
</style>
|
||||
<script type="importmap">
|
||||
<script type="importmap">
|
||||
{
|
||||
"imports": {
|
||||
"react": "https://esm.sh/react@18.2.0",
|
||||
"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": "https://aistudiocdn.com/react@^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>
|
||||
</head>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/index.tsx"></script>
|
||||
</body>
|
||||
</html>
|
||||
22
package.json
22
package.json
@@ -1,23 +1,23 @@
|
||||
{
|
||||
"name": "m5rcel-portfolio",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"react": "^19.2.1",
|
||||
"react-dom": "^19.2.1",
|
||||
"framer-motion": "10.16.4",
|
||||
"lucide-react": "0.292.0"
|
||||
"framer-motion": "^10.16.4",
|
||||
"lucide-react": "0.292.0",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.14.0",
|
||||
"@vitejs/plugin-react": "^5.0.0",
|
||||
"typescript": "~5.8.2",
|
||||
"vite": "^6.2.0"
|
||||
"@types/react": "^18.2.0",
|
||||
"@types/react-dom": "^18.2.0",
|
||||
"@vitejs/plugin-react": "^4.2.0",
|
||||
"typescript": "^5.0.0",
|
||||
"vite": "^5.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,23 +1,6 @@
|
||||
import path from 'path';
|
||||
import { defineConfig, loadEnv } from 'vite';
|
||||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
|
||||
export default defineConfig(({ mode }) => {
|
||||
const env = loadEnv(mode, '.', '');
|
||||
return {
|
||||
server: {
|
||||
port: 3000,
|
||||
host: '0.0.0.0',
|
||||
},
|
||||
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, '.'),
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
});
|
||||
Reference in New Issue
Block a user