Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .fatherrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ import { defineConfig } from 'father';

export default defineConfig({
plugins: ['@rc-component/father-plugin'],
dts: { compiler: 'tsgo' },
});
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"scripts": {
"start": "dumi dev",
"build": "dumi build",
"compile": "father build && lessc assets/index.less assets/index.css",
"compile": "cross-env FATHER_TSCONFIG_NAME=tsconfig.build.json father build && lessc assets/index.less assets/index.css",
"prepublishOnly": "npm run compile && rc-np",
"lint": "eslint src/ docs/examples/ --ext .tsx,.ts,.jsx,.js",
"test": "rc-test",
Expand All @@ -57,6 +57,7 @@
"@types/node": "^26.0.1",
"@types/react": "^19.2.17",
"@types/react-dom": "^19.2.3",
"@typescript/native-preview": "7.0.0-dev.20260707.2",
"cross-env": "^10.1.0",
"dumi": "^2.4.38",
"eslint": "^10.6.0",
Expand Down
8 changes: 8 additions & 0 deletions tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"rootDir": "src"
},
"include": ["src"],
"exclude": ["node_modules", "es", "lib", "dist", "docs-dist", ".doc", ".dumi", "coverage", "tests"]
Comment on lines +6 to +7

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Since tsconfig.build.json extends ./tsconfig.json, it automatically inherits the exclude configuration from the base file. Additionally, because include is explicitly restricted to ["src"], any top-level directories outside of src (such as tests, docs-dist, etc.) are already excluded by default. We can safely omit the redundant exclude array to simplify the configuration and avoid duplicating the excluded directories list.

  "include": ["src"]

}
Loading