mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-20 07:47:19 +08:00
#### PR Dependency Tree * **PR #14434** 👈 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 * **New Features** * Introduced rspack bundler as an alternative to webpack for optimized builds. * **Tests & Quality** * Added comprehensive editor semantic tests covering markdown, hotkeys, and slash-menu operations. * Expanded CI cross-browser testing to Chromium, Firefox, and WebKit; improved shape-rendering tests to account for zoom. * **Bug Fixes** * Corrected CSS overlay styling for development servers. * Fixed TypeScript typings for build tooling. * **Other** * Document duplication now produces consistent "(n)" suffixes. * French i18n completeness increased to 100%. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
48 lines
1.2 KiB
TypeScript
48 lines
1.2 KiB
TypeScript
import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin';
|
|
import { defineConfig } from 'vitest/config';
|
|
|
|
export default defineConfig(_configEnv =>
|
|
defineConfig({
|
|
esbuild: { target: 'es2018' },
|
|
optimizeDeps: {
|
|
force: true,
|
|
esbuildOptions: {
|
|
// Vitest hardcodes the esbuild target to es2020,
|
|
// override it to es2022 for top level await.
|
|
target: 'es2022',
|
|
},
|
|
},
|
|
plugins: [vanillaExtractPlugin()],
|
|
test: {
|
|
include: ['src/__tests__/**/*.spec.ts'],
|
|
retry: process.env.CI === 'true' ? 3 : 0,
|
|
browser: {
|
|
enabled: true,
|
|
headless: process.env.CI === 'true',
|
|
instances: [
|
|
{ browser: 'chromium' },
|
|
{ browser: 'firefox' },
|
|
{ browser: 'webkit' },
|
|
],
|
|
provider: 'playwright',
|
|
isolate: false,
|
|
viewport: {
|
|
width: 1024,
|
|
height: 768,
|
|
},
|
|
},
|
|
coverage: {
|
|
provider: 'istanbul', // or 'c8'
|
|
reporter: ['lcov'],
|
|
reportsDirectory: '../../.coverage/integration-test',
|
|
},
|
|
deps: {
|
|
interopDefault: true,
|
|
},
|
|
testTransformMode: {
|
|
web: ['src/__tests__/**/*.spec.ts'],
|
|
},
|
|
},
|
|
})
|
|
);
|