mirror of
https://github.com/langgenius/dify.git
synced 2026-05-08 03:36:32 +08:00
33 lines
759 B
TypeScript
33 lines
759 B
TypeScript
import react from '@vitejs/plugin-react'
|
|
import { defineConfig } from 'vite-plus'
|
|
import { playwright } from 'vite-plus/test/browser-playwright'
|
|
|
|
const isCI = !!process.env.CI
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
resolve: {
|
|
tsconfigPaths: true,
|
|
},
|
|
test: {
|
|
globals: true,
|
|
browser: {
|
|
enabled: true,
|
|
provider: playwright(),
|
|
instances: [{ browser: 'chromium' }],
|
|
headless: true,
|
|
},
|
|
coverage: {
|
|
provider: 'v8',
|
|
include: ['src/**/*.{ts,tsx}'],
|
|
exclude: [
|
|
'src/**/*.stories.{ts,tsx}',
|
|
'src/**/__tests__/**',
|
|
'src/themes/**',
|
|
'src/styles/**',
|
|
],
|
|
reporter: isCI ? ['json', 'json-summary'] : ['text', 'json', 'json-summary'],
|
|
},
|
|
},
|
|
})
|