diff --git a/packages/react-components/react-components/config/api-extractor.json b/packages/react-components/react-components/config/api-extractor.json index eee94ff6de902d..637d9797ae3e6e 100644 --- a/packages/react-components/react-components/config/api-extractor.json +++ b/packages/react-components/react-components/config/api-extractor.json @@ -1,5 +1,9 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "extends": "@fluentui/scripts/api-extractor/api-extractor.common.v-next.json", - "mainEntryPointFilePath": "/dist/types/index.d.ts" + "dtsRollup": { + "enabled": true, + "untrimmedFilePath": "", + "publicTrimmedFilePath": "/dist/index.d.ts" + } } diff --git a/packages/react-components/react-components/config/api-extractor.local.json b/packages/react-components/react-components/config/api-extractor.local.json deleted file mode 100644 index fc68f7c9367c8c..00000000000000 --- a/packages/react-components/react-components/config/api-extractor.local.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - "extends": "./api-extractor.json", - "mainEntryPointFilePath": "/dist/types/packages/react-components//src/index.d.ts", - "compiler": { - /** - * This is a quickfix to make build:local work - * - @see https://github.com/microsoft/fluentui/issues/19360 - * - config uses standard tsconfig.lib.json and overrides path aliases - */ - "overrideTsconfig": { - "extends": "./tsconfig.lib.json", - "compilerOptions": { - "paths": { - "@fluentui/*": ["dist/*/src/index.d.ts"] - } - } - } - } -} diff --git a/packages/react-components/react-components/config/api-extractor.unstable.json b/packages/react-components/react-components/config/api-extractor.unstable.json index 86279bdf5c1bbf..902ba703fe3bb5 100644 --- a/packages/react-components/react-components/config/api-extractor.unstable.json +++ b/packages/react-components/react-components/config/api-extractor.unstable.json @@ -1,17 +1,14 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "extends": "@fluentui/scripts/api-extractor/api-extractor.common.v-next.json", - "mainEntryPointFilePath": "/dist/types/unstable/index.d.ts", + "mainEntryPointFilePath": "/../../../dist/out-tsc/types/packages/react-components//src/unstable/index.d.ts", "apiReport": { "enabled": true, "reportFileName": ".unstable.api.md" }, - "docModel": { - "enabled": true, - "apiJsonFilePath": "/dist/.unstable.api.json" - }, "dtsRollup": { "enabled": true, - "untrimmedFilePath": "/dist/unstable.d.ts" + "untrimmedFilePath": "", + "publicTrimmedFilePath": "/dist/unstable.d.ts" } } diff --git a/packages/react-components/react-components/package.json b/packages/react-components/react-components/package.json index 50cb77008ab286..bc5854f2775584 100644 --- a/packages/react-components/react-components/package.json +++ b/packages/react-components/react-components/package.json @@ -4,7 +4,7 @@ "description": "Suite package for converged React components", "main": "lib-commonjs/index.js", "module": "lib/index.js", - "typings": "dist/index.d.ts", + "typings": "./dist/index.d.ts", "sideEffects": false, "repository": { "type": "git", @@ -19,11 +19,10 @@ "just": "just-scripts", "lint": "just-scripts lint", "start": "yarn storybook", - "docs": "api-extractor run --config=config/api-extractor.local.json --local", - "build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../../scripts/typescript/normalize-import --output ./dist/types/packages/react-components/react-components/src && yarn docs", "storybook": "start-storybook --port 3000 --no-manager-cache", "test": "jest --passWithNoTests", - "type-check": "tsc -b tsconfig.json" + "type-check": "tsc -b tsconfig.json", + "generate-api": "tsc -p ./tsconfig.lib.json --emitDeclarationOnly && just-scripts api-extractor" }, "devDependencies": { "@fluentui/eslint-plugin": "*", @@ -87,12 +86,12 @@ }, "exports": { ".": { - "types": "./lib/index.d.ts", + "types": "./dist/index.d.ts", "import": "./lib/index.js", "require": "./lib-commonjs/index.js" }, "./unstable": { - "types": "./lib/unstable/index.d.ts", + "types": "./dist/unstable.d.ts", "import": "./lib/unstable/index.js", "require": "./lib-commonjs/unstable/index.js" }, diff --git a/packages/react-components/react-components/src/unstable/package.json__tmpl__ b/packages/react-components/react-components/src/unstable/package.json__tmpl__ index 6a148f872a8cb9..91359ab10175e4 100644 --- a/packages/react-components/react-components/src/unstable/package.json__tmpl__ +++ b/packages/react-components/react-components/src/unstable/package.json__tmpl__ @@ -7,7 +7,7 @@ "license": "MIT", "exports": { ".": { - "types": "./../lib/unstable/index.d.ts", + "types": "./../dist/unstable.d.ts", "import": "./../lib/unstable/index.js", "require": "./../lib-commonjs/unstable/index.js" } diff --git a/packages/react-components/react-components/tsconfig.lib.json b/packages/react-components/react-components/tsconfig.lib.json index ef66992c5a174a..008c602dc19d24 100644 --- a/packages/react-components/react-components/tsconfig.lib.json +++ b/packages/react-components/react-components/tsconfig.lib.json @@ -3,9 +3,9 @@ "compilerOptions": { "noEmit": false, "lib": ["ES2019", "dom"], - "outDir": "dist", "declaration": true, - "declarationDir": "dist/types", + "declarationDir": "../../../dist/out-tsc/types", + "outDir": "../../../dist/out-tsc", "inlineSources": true, "types": ["static-assets", "environment"] },