apps/chat/vite.config.ts (29 lines of code) (raw):
/// <reference types='vitest' />
import { configDefaults } from 'vitest/config';
import react from '@vitejs/plugin-react';
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
import path from 'path';
import { defineConfig } from 'vite';
export default defineConfig({
root: __dirname,
plugins: [nxViteTsPaths(), react()],
resolve: {
alias: {
'@': path.resolve(__dirname, './'),
},
},
// Uncomment this if you are using workers.
// worker: {
// plugins: [ nxViteTsPaths() ],
// },
test: {
cache: false,
globals: true,
environment: 'jsdom',
setupFiles: ['./tests/setupTests.ts'],
include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
exclude: [...configDefaults.exclude],
coverage: {
reportsDirectory: '../../coverage/chat',
reporter: ['text', 'json', 'html'],
provider: 'v8',
},
reporters: 'verbose',
css: true,
},
});