Init Commit

This commit is contained in:
2026-06-04 16:26:23 +09:00
commit 1e64827f57
64 changed files with 10718 additions and 0 deletions
+52
View File
@@ -0,0 +1,52 @@
import {defineConfig} from 'vite'
import react from '@vitejs/plugin-react'
import {fileURLToPath, URL} from 'node:url';
import {VitePWA} from 'vite-plugin-pwa'
// https://vite.dev/config/
export default defineConfig({
plugins: [
react(),
VitePWA({
registerType: 'autoUpdate',
manifest: {
name: 'AI Language Chat',
short_name: 'AI Lang',
description: 'Chat with AI to learn foreign languages',
start_url: '/',
scope: '/',
display: 'standalone',
background_color: '#ffffff',
theme_color: '#2563EB',
icons: [
{
src: '/android-chrome-192x192.png',
sizes: '192x192',
type: 'image/png'
},
{
src: '/android-chrome-512x512.png',
sizes: '512x512',
type: 'image/png'
},
{
src: '/android-chrome-512x512.png',
sizes: '512x512',
type: 'image/png',
purpose: 'any maskable'
}
]
}
})
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
}
},
server: {
host: '0.0.0.0',
port: 5223,
strictPort: true //如果端口被占直接报错,不自动换
}
})