1
0
Files
card/vite.config.ts
syui 3ebc0c8aef Complete React migration improvements and fixes
- Fix button styling inconsistency for 'did' button using proper CSS reset
- Replace Font Awesome spinners with yellow color (#fff700) for consistency
- Implement holographic card effects for special status cards (yui, first, etc.)
- Add cached user data loading from /json/users.json for faster initial load
- Fix loading states to show spinners instead of "User not found" messages
- Clean up debug console logs for production readiness
- Add proper error handling for API calls
- Update CSS imports to use local files from /pkg/ directory

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-18 14:43:38 +09:00

45 lines
1.1 KiB
TypeScript

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
export default defineConfig({
plugins: [react()],
build: {
outDir: 'dist',
rollupOptions: {
output: {
entryFileNames: '[name].js',
chunkFileNames: '[name].js',
assetFileNames: '[name].[ext]'
}
}
},
server: {
port: 8080,
proxy: {
'/api': {
target: 'https://api.syui.ai',
changeOrigin: true,
secure: true,
rewrite: (path) => path.replace(/^\/api/, ''),
configure: (proxy, _options) => {
proxy.on('error', (err, _req, _res) => {
console.log('proxy error', err);
});
proxy.on('proxyReq', (proxyReq, req, _res) => {
console.log('Sending Request to the Target:', req.method, req.url);
});
proxy.on('proxyRes', (proxyRes, req, _res) => {
console.log('Received Response from the Target:', proxyRes.statusCode, req.url);
});
},
}
}
},
preview: {
port: 8080,
host: '127.0.0.1',
strictPort: false,
https: false,
open: false
}
})