-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathcypress.config.ts
45 lines (42 loc) · 1.23 KB
/
cypress.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
import { defineConfig } from 'cypress'
import vue from '@vitejs/plugin-vue'
import vueJsx from '@vitejs/plugin-vue-jsx'
import sucrase from '@rollup/plugin-sucrase'
import createBundler from '@bahmutov/cypress-esbuild-preprocessor'
export default defineConfig({
projectId: '89d3nq',
fixturesFolder: false,
component: {
devServer: {
framework: 'vue',
bundler: 'vite',
viteConfig: {
plugins: [
vue(),
vueJsx({
exclude: '**/react/**/*',
}),
// to allow for both react and vue JSX to be used we do not use esbuild to compile JSX,
// we use sucrase (about as fast)
sucrase({
jsxPragma: 'React.createElement',
jsxFragmentPragma: 'React.Fragment',
disableESTransforms: true,
enableLegacyBabel5ModuleInterop: false,
enableLegacyTypeScriptModuleInterop: false,
production: false,
transforms: ['typescript', 'jsx'],
include: ['**/*.tsx'],
exclude: '**/vue/**/*',
}),
],
},
},
},
e2e: {
baseUrl: 'http://localhost:5173/',
setupNodeEvents(on, config) {
on('file:preprocessor', createBundler())
},
},
})