fix: update TypeScript configuration for correct root directory and test exclusion

This commit is contained in:
2026-02-20 21:08:20 -05:00
parent 19ef9042ce
commit 4417b7ade9
4 changed files with 10 additions and 7 deletions

View File

@@ -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": "",

View File

@@ -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",
] ]
} }

View File

@@ -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/**/*",
], ],
} }

View File

@@ -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: {