Skip to content

Commit a894549

Browse files
committed
Try setting the build target in Vitest
1 parent 6bdb444 commit a894549

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"noImplicitAny": true,
1313
"importHelpers": false,
1414
"inlineSources": false,
15-
"removeComments": true
15+
"removeComments": true,
16+
"resolveJsonModule": true
1617
},
1718
"include": [
1819
"./lib/*.ts"

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "./tsconfig.build.json",
2+
"extends": "./tsconfig.base.json",
33
"include": [
44
"./*.ts",
55
"lib/*.ts",

vitest.config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { compilerOptions } from './tsconfig.base.json'
12
import { defineConfig } from 'vitest/config'
23
import { playwright } from '@vitest/browser-playwright'
34

@@ -8,6 +9,10 @@ const browsers: ('chromium' | 'firefox' | 'webkit')[] = [
89
]
910

1011
export default defineConfig({
12+
build: {
13+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
14+
target: compilerOptions.target
15+
},
1116
test: {
1217
projects: [
1318
...browsers.map(browser => ({

0 commit comments

Comments
 (0)