初始化项目;更新至 v0.1.0_20251209 版本

This commit is contained in:
2025-12-09 22:18:14 +08:00
parent 051d9603b1
commit 2c7cbac954
15 changed files with 584 additions and 2 deletions

21
vite.config.ts Normal file
View File

@@ -0,0 +1,21 @@
import { defineConfig, loadEnv } from 'vite';
import react from '@vitejs/plugin-react';
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, '.', '');
return {
plugins: [react()],
define: {
'process.env.API_KEY': JSON.stringify(process.env.API_KEY || env.API_KEY)
},
server: {
port: 8080,
host: '0.0.0.0'
},
preview: {
port: 8080,
host: '0.0.0.0',
allowedHosts: true
}
};
});