1
0

fix(ts): align with create-vue setup

This commit is contained in:
Dominik Pschenitschni 2024-06-11 17:54:28 +02:00 committed by konrad
parent f36115871c
commit bf28a0c795
7 changed files with 14 additions and 3 deletions

View File

@ -7,6 +7,5 @@
"target": "ES2015", "target": "ES2015",
"lib": ["ESNext", "dom"], "lib": ["ESNext", "dom"],
"types": ["cypress"], "types": ["cypress"],
"ignoreDeprecations": "5.0"
} }
} }

View File

@ -4,6 +4,7 @@
"exclude": ["src/**/__tests__/*"], "exclude": ["src/**/__tests__/*"],
"compilerOptions": { "compilerOptions": {
"composite": true, "composite": true,
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
"baseUrl": ".", "baseUrl": ".",
"lib": ["ESNext", "DOM", "WebWorker"], "lib": ["ESNext", "DOM", "WebWorker"],
@ -18,6 +19,5 @@
// https://github.com/ikenfin/vite-plugin-sentry#typescript // https://github.com/ikenfin/vite-plugin-sentry#typescript
"vite-plugin-sentry/client" "vite-plugin-sentry/client"
], ],
"ignoreDeprecations": "5.0"
} }
} }

View File

@ -6,6 +6,11 @@
"include": ["vite.config.*", "vitest.config.*", "cypress.config.*"], "include": ["vite.config.*", "vitest.config.*", "cypress.config.*"],
"compilerOptions": { "compilerOptions": {
"composite": true, "composite": true,
"noEmit": true,
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.config.tsbuildinfo",
"module": "ESNext",
"moduleResolution": "Bundler",
"types": ["node"] "types": ["node"]
} }
} }

View File

@ -10,5 +10,8 @@
{ {
"path": "./tsconfig.vitest.json" "path": "./tsconfig.vitest.json"
} }
] ],
"compilerOptions": {
"module": "NodeNext"
}
} }

View File

@ -3,6 +3,8 @@
"exclude": [], "exclude": [],
"compilerOptions": { "compilerOptions": {
"composite": true, "composite": true,
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.vitest.tsbuildinfo",
"lib": [], "lib": [],
"types": ["node"] "types": ["node"]
} }

View File

@ -1,5 +1,6 @@
/// <reference types="vitest" /> /// <reference types="vitest" />
import {defineConfig, type PluginOption, loadEnv} from 'vite' import {defineConfig, type PluginOption, loadEnv} from 'vite'
import {configDefaults} from 'vitest/config'
import vue from '@vitejs/plugin-vue' import vue from '@vitejs/plugin-vue'
import legacyFn from '@vitejs/plugin-legacy' import legacyFn from '@vitejs/plugin-legacy'
import {URL, fileURLToPath} from 'node:url' import {URL, fileURLToPath} from 'node:url'
@ -87,6 +88,7 @@ export default defineConfig(({mode}) => {
// https://vitest.dev/config/ // https://vitest.dev/config/
test: { test: {
environment: 'happy-dom', environment: 'happy-dom',
exclude: [...configDefaults.exclude, 'e2e/**'],
'vitest.commandLine': 'pnpm test:unit', 'vitest.commandLine': 'pnpm test:unit',
}, },
css: { css: {