Files
imphnen-frontend-service/apps/hackathon/vite.config.ts
T
maulanasdqnandClaude Opus 4.6 d5b267332f fix: generate route trees and fix build errors for all apps
- Generated routeTree.gen.ts for all 6 apps (was empty placeholder)
- Fixed className backtick syntax in roles create/edit pages
- Fixed unescaped quote in dimentorin settings FAQ
- Route trees enable proper SPA navigation (no more full page reloads)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 22:53:17 +07:00

48 lines
1.3 KiB
TypeScript

/// <reference types='vitest' />
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
import { nxCopyAssetsPlugin } from '@nx/vite/plugins/nx-copy-assets.plugin';
import { TanStackRouterVite } from '@tanstack/router-plugin/vite';
export default defineConfig(() => ({
root: __dirname,
cacheDir: '../../node_modules/.vite/apps/hackathon',
server: {
port: 3004,
host: 'localhost',
},
preview: {
port: 3005,
host: 'localhost',
},
build: { rolldownOptions: { output: { codeSplitting: { groups: [{ name: 'vendor', test: /node_modules/ }] } } } },
plugins: [
TanStackRouterVite({
routeFileIgnorePattern: '_components|_hooks|_hook|_data',
}),
react(),
nxViteTsPaths(),
nxCopyAssetsPlugin(['*.md']),
],
build: {
outDir: '../../dist/apps/hackathon',
emptyOutDir: true,
reportCompressedSize: true,
commonjsOptions: {
transformMixedEsModules: true,
},
},
test: {
watch: false,
globals: true,
environment: 'jsdom',
include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
reporters: ['default'],
coverage: {
reportsDirectory: '../../coverage/apps/hackathon',
provider: 'v8' as const,
},
},
}));