-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
54 lines (51 loc) · 1.28 KB
/
vite.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/// <reference types="vitest" />
import process from 'node:process'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import glsl from 'vite-plugin-glsl'
import { templateCompilerOptions } from '@tresjs/core'
function noop() {}
const provider = process.env.PROVIDER || 'playwright'
const browser = process.env.BROWSER || (provider === 'playwright' ? 'chromium' : 'chrome')
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue({
...templateCompilerOptions,
}),
glsl(),
],
test: {
// environment: 'jsdom',
// globals: true,
// threads: false,
// environment: process.env.BROWSER_TEST ? 'node' : 'jsdom',
globals: true,
// threads: false,
// isolate: !process.env.BROWSER_TEST,
browser: {
enabled: true,
name: browser,
headless: false,
provider,
isolate: false,
},
open: false,
outputFile: './browser.json',
reporters: ['json', {
onInit: noop,
onPathsCollected: noop,
onCollected: noop,
onFinished: noop,
onTaskUpdate: noop,
onTestRemoved: noop,
onWatcherStart: noop,
onWatcherRerun: noop,
onServerRestart: noop,
onUserConsoleLog: noop,
}, 'default'],
env: {
BROWSER: browser,
},
},
})