diff --git a/package.json b/package.json index d9f2336fe..3c1746f3e 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "build:immutable": "bunchee index.ts --cwd immutable -m --no-sourcemap", "prepublishOnly": "yarn clean && yarn build", "publish-beta": "yarn publish --tag beta", - "types:check": "tsc --noEmit && tsc --noEmit -p test", + "types:check": "tsc --noEmit --project tsconfig.check.json && tsc --noEmit -p test", "format": "prettier --write ./**/*.{ts,tsx}", "lint": "eslint . --ext .ts,.tsx --cache", "lint:fix": "yarn lint --fix", diff --git a/tsconfig.check.json b/tsconfig.check.json new file mode 100644 index 000000000..a1e69e7e9 --- /dev/null +++ b/tsconfig.check.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "rootDir": ".", + }, + "include": ["src", "immutable", "infinite"] +} diff --git a/tsconfig.json b/tsconfig.json index 85be5980c..000075d68 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,7 +12,7 @@ "noUnusedParameters": true, "strictBindCallApply": true, "outDir": "./dist", - "rootDir": ".", + "rootDir": "src", "strict": true, "target": "es5", "baseUrl": ".", @@ -24,7 +24,7 @@ }, "typeRoots": ["./src/types", "./node_modules/@types"] }, - "include": ["src", "immutable", "infinite"], + "include": ["src"], "exclude": ["./**/dist", "node_modules"], "watchOptions": { "watchFile": "useFsEvents",