quality / changes (push) Successful in 9s
quality / go (push) Skipped
quality / bird2 (push) Skipped
quality / commitlint (push) Skipped
quality / docker-check (push) Skipped
quality / openapi (push) Successful in 37s
quality / web (push) Successful in 2m14s
CD / quality (push) Successful in 5m51s
CD / publish (push) Successful in 6m42s
Случайно попавший в предыдущий коммит порт 8081 для локального мока возвращён на 8080. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
41 lines
1.5 KiB
TypeScript
41 lines
1.5 KiB
TypeScript
import { defineConfig } from 'vitest/config'
|
|
import react from '@vitejs/plugin-react'
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
import { TanStackRouterVite as TanStackRouterPlugin } from '@tanstack/router-plugin/vite'
|
|
import path from 'node:path'
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
TanStackRouterPlugin({ target: 'react', autoCodeSplitting: true }),
|
|
react(),
|
|
tailwindcss(),
|
|
],
|
|
resolve: {
|
|
alias: [
|
|
// shadcn components inside packages/ui import '@/hooks/use-mobile' (their own alias).
|
|
// Vite doesn't read tsconfig paths from packages/ui; expose a fallback so those imports
|
|
// resolve to packages/ui/src/hooks instead of apps/web/src/hooks.
|
|
{
|
|
find: '@/hooks/use-mobile',
|
|
replacement: path.resolve(__dirname, '../../packages/ui/src/hooks/use-mobile.ts'),
|
|
},
|
|
{ find: '@', replacement: path.resolve(__dirname, './src') },
|
|
{ find: '@evobgp/ui/components', replacement: path.resolve(__dirname, '../../packages/ui/src/components') },
|
|
{ find: '@evobgp/ui/hooks', replacement: path.resolve(__dirname, '../../packages/ui/src/hooks') },
|
|
{ find: '@evobgp/ui/lib/utils', replacement: path.resolve(__dirname, '../../packages/ui/src/lib/utils.ts') },
|
|
],
|
|
},
|
|
server: {
|
|
port: 5173,
|
|
proxy: {
|
|
'/v1': { target: 'http://127.0.0.1:8080', changeOrigin: true },
|
|
'/metrics': { target: 'http://127.0.0.1:8080', changeOrigin: true },
|
|
},
|
|
},
|
|
test: {
|
|
environment: 'happy-dom',
|
|
globals: true,
|
|
exclude: ['**/node_modules/**', '**/e2e/**', '**/dist/**'],
|
|
},
|
|
})
|