fix: update TypeScript configuration for correct root directory and test exclusion
This commit is contained in:
@@ -5,7 +5,8 @@
|
|||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "rimraf ./dist && tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json",
|
"build": "rimraf ./dist && tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json",
|
||||||
"prepare": "pnpm build"
|
"prepare": "pnpm build",
|
||||||
|
"test": "vitest"
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "",
|
"author": "",
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
"extends": "./tsconfig.json",
|
"extends": "./tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"rootDir": "./src",
|
"rootDir": "./lib",
|
||||||
},
|
},
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"tests/**/*",
|
"*.test.ts",
|
||||||
"vitest.config.ts",
|
"vitest.config.ts",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
"baseUrl": "./",
|
"baseUrl": "./",
|
||||||
"paths": {
|
"paths": {
|
||||||
"@/*": [
|
"@/*": [
|
||||||
"./src/*"
|
"lib/*"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"plugins": [
|
"plugins": [
|
||||||
@@ -31,10 +31,12 @@
|
|||||||
"transform": "typescript-transform-paths",
|
"transform": "typescript-transform-paths",
|
||||||
"afterDeclarations": true
|
"afterDeclarations": true
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
"typeRoots": [
|
||||||
|
"lib/types"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"src/**/*",
|
"lib/**/*",
|
||||||
"tests/**/*",
|
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { defineConfig } from 'vitest/config'
|
|||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
'@': path.resolve(__dirname, './src'),
|
'@': path.resolve(__dirname, './lib'),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
test: {
|
test: {
|
||||||
|
|||||||
Reference in New Issue
Block a user