diff --git a/change/@fluentui-react-table-7bc36841-f472-43be-97c0-3885e7f42c1e.json b/change/@fluentui-react-table-7bc36841-f472-43be-97c0-3885e7f42c1e.json new file mode 100644 index 0000000000000..838383cb7bd05 --- /dev/null +++ b/change/@fluentui-react-table-7bc36841-f472-43be-97c0-3885e7f42c1e.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: Migrate react-table to use new build", + "packageName": "@fluentui/react-table", + "email": "lingfangao@hotmail.com", + "dependentChangeType": "none" +} diff --git a/packages/react-components/react-table/config/api-extractor.json b/packages/react-components/react-table/config/api-extractor.json index eee94ff6de902..637d9797ae3e6 100644 --- a/packages/react-components/react-table/config/api-extractor.json +++ b/packages/react-components/react-table/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-table/config/api-extractor.local.json b/packages/react-components/react-table/config/api-extractor.local.json deleted file mode 100644 index 69e764bce3a59..0000000000000 --- a/packages/react-components/react-table/config/api-extractor.local.json +++ /dev/null @@ -1,5 +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" -} diff --git a/packages/react-components/react-table/package.json b/packages/react-components/react-table/package.json index 30a23e57e98d8..f34ddcb6a2e02 100644 --- a/packages/react-components/react-table/package.json +++ b/packages/react-components/react-table/package.json @@ -18,11 +18,10 @@ "just": "just-scripts", "lint": "just-scripts lint", "test": "jest --passWithNoTests", - "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-table/src && yarn docs", "type-check": "tsc -b tsconfig.json", "storybook": "start-storybook", - "start": "yarn storybook" + "start": "yarn storybook", + "generate-api": "tsc -p ./tsconfig.lib.json --emitDeclarationOnly && just-scripts api-extractor" }, "devDependencies": { "@fluentui/eslint-plugin": "*", diff --git a/packages/react-components/react-table/tsconfig.lib.json b/packages/react-components/react-table/tsconfig.lib.json index 5d7b14f1e0b70..7f94e04299ed8 100644 --- a/packages/react-components/react-table/tsconfig.lib.json +++ b/packages/react-components/react-table/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"] },