mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-23 21:55:02 +03:00
chore(electron): config vitest swc (#6282)
This commit is contained in:
parent
82cacd09d6
commit
d59e1389ec
@ -46,6 +46,7 @@
|
|||||||
"@toeverything/infra": "workspace:*",
|
"@toeverything/infra": "workspace:*",
|
||||||
"@types/mixpanel-browser": "^2.49.0",
|
"@types/mixpanel-browser": "^2.49.0",
|
||||||
"@types/uuid": "^9.0.8",
|
"@types/uuid": "^9.0.8",
|
||||||
|
"@vitejs/plugin-react-swc": "^3.6.0",
|
||||||
"builder-util-runtime": "^9.2.4",
|
"builder-util-runtime": "^9.2.4",
|
||||||
"core-js": "^3.36.1",
|
"core-js": "^3.36.1",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
import { resolve } from 'node:path';
|
import { resolve } from 'node:path';
|
||||||
import { fileURLToPath } from 'node:url';
|
import { fileURLToPath } from 'node:url';
|
||||||
|
|
||||||
|
import react from '@vitejs/plugin-react-swc';
|
||||||
import { defineConfig } from 'vitest/config';
|
import { defineConfig } from 'vitest/config';
|
||||||
|
|
||||||
const rootDir = fileURLToPath(new URL('../../..', import.meta.url));
|
const rootDir = fileURLToPath(new URL('../../..', import.meta.url));
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
|
plugins: [react()],
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
// prevent tests using two different sources of yjs
|
// prevent tests using two different sources of yjs
|
||||||
@ -15,6 +17,7 @@ export default defineConfig({
|
|||||||
},
|
},
|
||||||
|
|
||||||
test: {
|
test: {
|
||||||
|
setupFiles: [resolve(rootDir, './scripts/setup/global.ts')],
|
||||||
include: ['./test/**/*.spec.ts'],
|
include: ['./test/**/*.spec.ts'],
|
||||||
testTimeout: 5000,
|
testTimeout: 5000,
|
||||||
poolOptions: {
|
poolOptions: {
|
||||||
|
@ -468,6 +468,7 @@ __metadata:
|
|||||||
"@toeverything/infra": "workspace:*"
|
"@toeverything/infra": "workspace:*"
|
||||||
"@types/mixpanel-browser": "npm:^2.49.0"
|
"@types/mixpanel-browser": "npm:^2.49.0"
|
||||||
"@types/uuid": "npm:^9.0.8"
|
"@types/uuid": "npm:^9.0.8"
|
||||||
|
"@vitejs/plugin-react-swc": "npm:^3.6.0"
|
||||||
async-call-rpc: "npm:^6.4.0"
|
async-call-rpc: "npm:^6.4.0"
|
||||||
builder-util-runtime: "npm:^9.2.4"
|
builder-util-runtime: "npm:^9.2.4"
|
||||||
core-js: "npm:^3.36.1"
|
core-js: "npm:^3.36.1"
|
||||||
|
Loading…
Reference in New Issue
Block a user