2023-02-18 11:41:22 +03:00
|
|
|
import path from 'node:path';
|
|
|
|
|
|
|
|
import react from '@vitejs/plugin-react';
|
|
|
|
import { fileURLToPath } from 'url';
|
2023-02-17 05:43:52 +03:00
|
|
|
import { defineConfig } from 'vitest/config';
|
|
|
|
|
|
|
|
export default defineConfig({
|
2023-02-18 11:41:22 +03:00
|
|
|
plugins: [react()],
|
2023-02-17 05:43:52 +03:00
|
|
|
test: {
|
2023-02-18 11:41:22 +03:00
|
|
|
include: ['packages/**/*.spec.ts', 'packages/**/*.spec.tsx'],
|
2023-02-17 05:43:52 +03:00
|
|
|
testTimeout: 5000,
|
|
|
|
coverage: {
|
|
|
|
provider: 'istanbul', // or 'c8'
|
|
|
|
reporter: ['lcov'],
|
|
|
|
reportsDirectory: '.coverage/store',
|
|
|
|
},
|
|
|
|
},
|
2023-02-18 11:41:22 +03:00
|
|
|
resolve: {
|
|
|
|
alias: {
|
|
|
|
'@affine/store': path.resolve(
|
|
|
|
fileURLToPath(new URL('packages/store', import.meta.url))
|
|
|
|
),
|
|
|
|
},
|
|
|
|
},
|
2023-02-17 05:43:52 +03:00
|
|
|
});
|