forked from connectrpc/examples-es
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcypress.config.ts
38 lines (35 loc) · 985 Bytes
/
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
import { defineConfig } from 'cypress'
const webpackPreprocessor = require('@cypress/webpack-preprocessor')
const ResolveTypeScriptPlugin = require('resolve-typescript-plugin')
const options = {
webpackOptions: {
resolve: {
extensions: ['.ts', '.tsx', '.js'],
plugins: [new ResolveTypeScriptPlugin()],
},
module: {
rules: [
{
test: /\.tsx?$/,
loader: 'ts-loader',
options: { transpileOnly: true },
},
],
},
},
}
export default defineConfig({
e2e: {
specPattern: 'cypress/e2e/**/*.{cy,spec}.{js,jsx,ts,tsx}',
baseUrl: 'http://localhost:4173',
setupNodeEvents(on, config) {
on('file:preprocessor', webpackPreprocessor(options))
},
},
component: {
devServer: {
framework: 'vue',
bundler: 'vite',
},
},
})