2026-01-21 20:22:27 +07:00
|
|
|
/// <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';
|
2026-04-11 17:04:14 +07:00
|
|
|
import { TanStackRouterVite } from '@tanstack/router-plugin/vite';
|
2026-01-21 20:22:27 +07:00
|
|
|
|
|
|
|
|
export default defineConfig(() => ({
|
|
|
|
|
root: __dirname,
|
|
|
|
|
cacheDir: '../../node_modules/.vite/apps/infra',
|
|
|
|
|
server: {
|
|
|
|
|
port: 3006,
|
|
|
|
|
host: 'localhost',
|
|
|
|
|
},
|
|
|
|
|
preview: {
|
|
|
|
|
port: 3007,
|
|
|
|
|
host: 'localhost',
|
|
|
|
|
},
|
2026-04-11 17:04:14 +07:00
|
|
|
plugins: [
|
|
|
|
|
TanStackRouterVite({
|
|
|
|
|
routeFileIgnorePattern: '_components|_hooks|_hook|_data',
|
|
|
|
|
}),
|
|
|
|
|
react(),
|
|
|
|
|
nxViteTsPaths(),
|
|
|
|
|
nxCopyAssetsPlugin(['*.md']),
|
|
|
|
|
],
|
2026-01-21 20:22:27 +07:00
|
|
|
build: {
|
|
|
|
|
outDir: '../../dist/apps/infra',
|
|
|
|
|
emptyOutDir: true,
|
|
|
|
|
reportCompressedSize: true,
|
|
|
|
|
commonjsOptions: {
|
|
|
|
|
transformMixedEsModules: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
}));
|