mantis-app
Version:
M.A.N.T.I.S (MongoDB, Analog, Nx, Tailwind CSS, Ionic, Storybook) is not just a CLI tool; it's your passport to a seamless full-stack project launch.
39 lines (36 loc) • 988 B
text/typescript
/// <reference types="vitest" />
import analog from '@analogjs/platform';
import { defineConfig, splitVendorChunkPlugin } from 'vite';
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
return {
root: __dirname,
publicDir: 'src/public',
build: {
outDir: '../../dist/apps/web-client/client',
reportCompressedSize: true,
commonjsOptions: { transformMixedEsModules: true },
target: ['es2020'],
},
server: {
fs: {
allow: ['.'],
},
},
plugins: [analog(), nxViteTsPaths(), splitVendorChunkPlugin()],
test: {
globals: true,
environment: 'jsdom',
setupFiles: ['src/test-setup.ts'],
include: ['**/*.spec.ts'],
reporters: ['default'],
cache: {
dir: `../../node_modules/.vitest`,
},
},
define: {
'import.meta.vitest': mode !== 'production',
},
};
});