23 lines
659 B
TypeScript
23 lines
659 B
TypeScript
import { defineConfig } from 'vite';
|
|
import tsconfigPaths from 'vite-tsconfig-paths';
|
|
import { nxCopyAssetsPlugin } from '@nx/vite/plugins/nx-copy-assets.plugin';
|
|
|
|
export default defineConfig(() => ({
|
|
root: __dirname,
|
|
cacheDir: '../../node_modules/.vite/apps/api',
|
|
plugins: [tsconfigPaths(), nxCopyAssetsPlugin(['*.md'])],
|
|
test: {
|
|
name: 'api',
|
|
watch: false,
|
|
globals: true,
|
|
environment: 'node',
|
|
include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
|
|
reporters: ['default'],
|
|
passWithNoTests: true,
|
|
coverage: {
|
|
reportsDirectory: '../../coverage/apps/api',
|
|
provider: 'v8' as const,
|
|
},
|
|
},
|
|
}));
|