diff --git a/.changeset/ui-build-declarations.md b/.changeset/ui-build-declarations.md new file mode 100644 index 00000000000..a845151cc84 --- /dev/null +++ b/.changeset/ui-build-declarations.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/packages/ui/package.json b/packages/ui/package.json index 256b30f6bfa..70945f0288d 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -71,6 +71,7 @@ "scripts": { "build": "pnpm build:umd && pnpm build:esm && pnpm check:no-rhc && pnpm type-check", "build:analyze": "rspack build --config rspack.config.js --env production --env analyze --analyze", + "build:declarations": "tsc -p tsconfig.declarations.json", "build:esm": "tsdown", "build:rsdoctor": "RSDOCTOR=true rspack build --config rspack.config.js --env production", "build:umd": "rspack build --config rspack.config.js --env production", diff --git a/packages/ui/tsconfig.declarations.json b/packages/ui/tsconfig.declarations.json new file mode 100644 index 00000000000..a1fc0a91dee --- /dev/null +++ b/packages/ui/tsconfig.declarations.json @@ -0,0 +1,21 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "declaration": true, + "declarationDir": "./dist", + "declarationMap": true, + "emitDeclarationOnly": true, + "skipLibCheck": true + }, + "exclude": [ + "node_modules", + "**/*.test.ts", + "**/*.test.tsx", + "**/*.spec.ts", + "**/*.spec.tsx", + "**/__tests__/**", + "**/__mocks__/**", + "**/test/**", + "**/tests/**" + ] +}