- packages/shared/src/geo: страны ISO 3166-1 alpha-2 + топ-города по странам - vps.tsx: countryOptions/cityOptions из справочника + существующих VPS, города фильтруются по выбранной стране - auto-complete-input: убран onBlur-хак с setTimeout, фильтрация по основному полю, initialFocus=false чтобы popover не закрывался - vite.config.ts + tsconfig.json: алиас @cfdm/shared/geo Co-authored-by: Cursor <cursoragent@cursor.com>
38 lines
1.3 KiB
TypeScript
38 lines
1.3 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: [
|
|
{ find: '@', replacement: path.resolve(__dirname, './src') },
|
|
{ find: '@cfdm/ui/components', replacement: path.resolve(__dirname, '../../packages/ui/src/components') },
|
|
{ find: '@cfdm/ui/hooks', replacement: path.resolve(__dirname, '../../packages/ui/src/hooks') },
|
|
{ find: '@cfdm/ui/lib/utils', replacement: path.resolve(__dirname, '../../packages/ui/src/lib/utils.ts') },
|
|
{ find: /^@cfdm\/shared\/(.*)$/, replacement: path.resolve(__dirname, '../../packages/shared/src/$1') },
|
|
{ find: '@cfdm/shared', replacement: path.resolve(__dirname, '../../packages/shared/src/index.ts') },
|
|
{ find: '@cfdm/db', replacement: path.resolve(__dirname, '../../packages/db/src/index.ts') },
|
|
],
|
|
},
|
|
server: {
|
|
port: 5173,
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:3001',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
test: {
|
|
environment: 'happy-dom',
|
|
globals: true,
|
|
},
|
|
})
|