- Upgrade Nx 22.1.1 → 22.6.3 and all patch/minor dependencies - Restructure shared libs: move business logic from utils to service - Consolidate shadcn-ui into ui lib with atomic design pattern - Fix container centering for landing app (Tailwind v4 compatibility) - Fix button styling by updating @source directive in globals.css - Fix SiCss3 → SiCss rename in react-icons 5.6 - Fix duplicate useSession export conflict - Remove dead code, comments, and unused files Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
64 lines
1.6 KiB
TypeScript
64 lines
1.6 KiB
TypeScript
/// <reference types='vitest' />
|
|
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
import dts from 'vite-plugin-dts';
|
|
import * as path from 'path';
|
|
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
|
|
import { nxCopyAssetsPlugin } from '@nx/vite/plugins/nx-copy-assets.plugin';
|
|
|
|
export default defineConfig(() => ({
|
|
root: __dirname,
|
|
cacheDir: '../../node_modules/.vite/libs/ui',
|
|
plugins: [
|
|
react(),
|
|
nxViteTsPaths(),
|
|
nxCopyAssetsPlugin(['*.md']),
|
|
dts({
|
|
entryRoot: 'src',
|
|
tsconfigPath: path.join(__dirname, 'tsconfig.lib.json'),
|
|
}),
|
|
],
|
|
build: {
|
|
outDir: '../../dist/libs/ui',
|
|
emptyOutDir: true,
|
|
reportCompressedSize: true,
|
|
commonjsOptions: {
|
|
transformMixedEsModules: true,
|
|
},
|
|
lib: {
|
|
entry: [
|
|
'src/atoms/index.ts',
|
|
'src/molecules/index.ts',
|
|
'src/organisms/index.ts',
|
|
],
|
|
name: 'ui',
|
|
fileName: 'index',
|
|
formats: ['es' as const],
|
|
},
|
|
rollupOptions: {
|
|
external: [
|
|
'react',
|
|
'react-dom',
|
|
'react/jsx-runtime',
|
|
'react-router-dom',
|
|
'@ant-design/icons',
|
|
'@imphnen-frontend-service/service',
|
|
'@imphnen-frontend-service/utils',
|
|
],
|
|
},
|
|
},
|
|
test: {
|
|
watch: false,
|
|
environment: 'jsdom',
|
|
setupFiles: ['./vitest.setup.ts'],
|
|
globalsSetup: './vitest.setup.ts',
|
|
globals: true,
|
|
include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
|
|
reporters: ['default'],
|
|
coverage: {
|
|
reportsDirectory: '../../coverage/libs/ui',
|
|
provider: 'v8' as const,
|
|
},
|
|
},
|
|
}));
|