Skip to content

Commit

Permalink
chore(tsc): split configs for tests/build, enable verbatimModuleSyntax
Browse files Browse the repository at this point in the history
* replace importsNotUsedAsValues with verbatimModuleSyntax option
* split configs for builds and tests
* switch build mod type to esnext
* tests use bundler mod res
  • Loading branch information
brawaru committed Apr 11, 2023
1 parent 4640301 commit 64c2706
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
2 changes: 1 addition & 1 deletion tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"strict": true,
"strictBindCallApply": true,

"importsNotUsedAsValues": "error",
"verbatimModuleSyntax": true,

"resolveJsonModule": true,
"isolatedModules": true,
Expand Down
7 changes: 2 additions & 5 deletions tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"compilerOptions": {
"composite": true,

"module": "CommonJS",
"module": "ESNext",

"moduleResolution": "node",

Expand All @@ -13,9 +13,6 @@
},
"include": [
"./build/*.ts",
"./build.config.ts",
"./vitest.config.ts",
"./test/*.test.ts",
"./tsconfig.build.json"
"./build.config.ts"
]
}
18 changes: 18 additions & 0 deletions tsconfig.tests.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"extends": "./tsconfig.base.json",
"compilerOptions": {
"composite": true,

"module": "ESNext",

"moduleResolution": "bundler",

"esModuleInterop": true,

"types": []
},
"include": [
"./vitest.config.ts",
"./test/*.test.ts"
]
}

0 comments on commit 64c2706

Please sign in to comment.