mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-11 07:06:28 +08:00
fee0cfa3f4
#### PR Dependency Tree * **PR #14785** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Updated error-tracking SDK versions across frontend packages. * Upgraded Electron build toolchain and front-end build plugins for improved compatibility. * Replaced a SWC-based React plugin with the standard React Vite plugin. * Removed unused development dependencies from CLI tooling. * Bumped a Rust workspace dependency to a patch release. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
36 lines
976 B
TypeScript
36 lines
976 B
TypeScript
// TODO(@forehalo): reuse '@affine-tools/utils' once it's ready to switch to esm module
|
|
import { resolve } from 'node:path';
|
|
import { fileURLToPath } from 'node:url';
|
|
|
|
import react from '@vitejs/plugin-react';
|
|
import { defineConfig } from 'vitest/config';
|
|
|
|
const rootDir = fileURLToPath(new URL('../../../..', import.meta.url));
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
resolve: {
|
|
alias: {
|
|
// prevent tests using two different sources of yjs
|
|
yjs: resolve(rootDir, 'node_modules/yjs'),
|
|
'@affine/electron': resolve(
|
|
rootDir,
|
|
'packages/frontend/apps/electron/src'
|
|
),
|
|
},
|
|
},
|
|
|
|
test: {
|
|
setupFiles: [resolve(rootDir, './scripts/setup/global.ts')],
|
|
include: ['./test/**/*.spec.ts'],
|
|
testTimeout: 5000,
|
|
pool: 'forks',
|
|
maxWorkers: 1,
|
|
coverage: {
|
|
provider: 'istanbul', // or 'istanbul'
|
|
reporter: ['lcov'],
|
|
reportsDirectory: resolve(rootDir, '.coverage/electron'),
|
|
},
|
|
},
|
|
});
|