mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-05 01:50:27 +08:00
- Implemented `DiscoveryPage` with session management and findings display. - Added tests for `DiscoveryPage` to ensure proper rendering and functionality. - Created `QueuePage` for managing issue execution queues with stats and actions. - Added tests for `QueuePage` to verify UI elements and translations. - Introduced `useIssues` hooks for fetching and managing issue data. - Added loading skeletons and error handling for better user experience. - Created `vite-env.d.ts` for TypeScript support in Vite environment.
63 lines
1.5 KiB
TypeScript
63 lines
1.5 KiB
TypeScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import path from 'path'
|
|
import { fileURLToPath } from 'url'
|
|
|
|
// ES module equivalent of __dirname
|
|
const __filename = fileURLToPath(import.meta.url)
|
|
const __dirname = path.dirname(__filename)
|
|
|
|
// Get base path from environment variable
|
|
// Always use VITE_BASE_URL if set (for both dev and production)
|
|
const basePath = process.env.VITE_BASE_URL || '/'
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
base: basePath,
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, './src'),
|
|
},
|
|
extensions: ['.ts', '.tsx', '.js', '.jsx', '.json'],
|
|
},
|
|
server: {
|
|
// Don't hardcode port - allow command line override
|
|
// strictPort: true ensures the specified port is used or fails
|
|
strictPort: true,
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:3456',
|
|
changeOrigin: true,
|
|
},
|
|
'/ws': {
|
|
target: 'ws://localhost:3456',
|
|
ws: true,
|
|
},
|
|
},
|
|
},
|
|
build: {
|
|
outDir: 'dist',
|
|
sourcemap: true,
|
|
},
|
|
test: {
|
|
globals: true,
|
|
environment: 'jsdom',
|
|
setupFiles: './src/test/setup.ts',
|
|
coverage: {
|
|
provider: 'v8',
|
|
reporter: ['text', 'json', 'html'],
|
|
exclude: [
|
|
'node_modules/',
|
|
'src/test/',
|
|
'**/*.d.ts',
|
|
'**/*.config.*',
|
|
'**/mockData/*',
|
|
'src/main.tsx',
|
|
],
|
|
},
|
|
include: ['src/**/*.{test,spec}.{ts,tsx}'],
|
|
css: true,
|
|
},
|
|
})
|