Skip to content

tools: set build:local and api-extractor based on package context #19110

@Hotell

Description

@Hotell

Looks that it's related to a generated structure after the build command and a fact that @fluentui/make-styles does not have dependencies from a repo that results in different output in /dist:

Long term fix: All of this will be mitigated once we start building into root /dist within monorepo

implementation

If migrated package doesn't contain any vNext dependencies following changes need to be applied:

// @filename <packageName>/config/api-extractor.local.json
-  "mainEntryPointFilePath": "<projectFolder>/dist/<unscopedPackageName>/src/index.d.ts"
+  "mainEntryPointFilePath": "<projectFolder>/dist/index.d.ts"
// @filename <packageName>/package.json
-    "build:local": "tsc -p . --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output dist/<packageName>/src && yarn docs"
+    "build:local": "tsc -p . --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output dist/ && yarn docs"

Originally posted by @Hotell in #18675 (comment)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions