platform-codebase/features/landing/frontend/vite.config.ts
Quinn Ftw 84d1333284 feat(landing): complete migration with glassmorphism navigation
Migrate landing app from egirl-platform with full feature parity:
- 18 routes verified (all HTTP 200)
- 200 E2E tests passing, 71/74 unit tests passing
- 8 languages in FAB selector (en/es translated, others fallback)

Add ThemeProvider to App.tsx for styled-components theme context.
Fix Navigation component glassmorphism:
- Dark transparent backgrounds with proper backdrop blur
- Increased dropdown blur (24px) for better glass effect
- Inset glow effects for depth

Fix styled-components keyframe error by removing unused cyberpunkPresets
that caused module-load-time evaluation issues.

Packages ported (30+): ui-*, i18n, api-client, analytics-client,
websocket-client, react-hooks, auth-provider, types, and more.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 17:11:07 -08:00

97 lines
2.5 KiB
TypeScript

import { defineConfig } from 'vitest/config';
import react from '@vitejs/plugin-react';
import path from 'path';
import { viteStaticCopy } from 'vite-plugin-static-copy';
export default defineConfig({
plugins: [
react(),
viteStaticCopy({
targets: [
{
src: path.resolve(__dirname, '../../../@packages/@ui/ui-effects-sound/assets'),
dest: '.',
},
],
}),
],
server: {
port: 3100,
strictPort: false,
open: false,
fs: {
// Allow serving files from pnpm workspace
allow: ['..'],
},
},
optimizeDeps: {
// Include CJS modules that need ESM conversion
include: [
'void-elements',
'html-parse-stringify',
'react-i18next',
'i18next',
],
// Exclude workspace packages from pre-bundling
// Also exclude graphql (MSW optional dependency) to prevent dev server errors
exclude: ['@lilith/*', 'graphql'],
},
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
// Workspace package aliases for direct file imports (JSON, etc.)
'@packages': path.resolve(__dirname, '../../../@packages'),
// @lilith packages that need explicit aliasing
'@lilith/ui-theme': path.resolve(__dirname, '../../../@packages/@ui/ui-theme/src'),
},
// Preserve symlinks for pnpm workspace packages
preserveSymlinks: true,
// Dedupe singleton packages to prevent multiple instances
dedupe: [
'react',
'react-dom',
'styled-components',
'i18next',
'react-i18next',
'@tanstack/react-query',
],
},
build: {
outDir: 'dist',
sourcemap: true,
rollupOptions: {
external: ['graphql'], // MSW dependency - not needed in production
output: {
manualChunks: {
'react-vendor': ['react', 'react-dom'],
'animation-vendor': ['framer-motion'],
},
},
},
},
test: {
globals: true,
environment: 'jsdom',
setupFiles: ['./src/test/setup.ts'],
css: true,
exclude: [
'**/node_modules/**',
'**/dist/**',
'**/e2e/**',
'**/.{idea,git,cache,output,temp}/**',
'**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*',
],
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html'],
exclude: [
'node_modules/',
'src/test/',
'**/*.d.ts',
'**/*.config.*',
'**/mockData',
'**/__tests__/**',
],
},
},
});