Skip to content

Commit 3856cbd

Browse files
author
Christina Mullen
committed
fix(metrics): add files field to exclude src from published npm package
The published npm package included src/ and tsconfig.json (monorepo leftovers). When consumers' TypeScript resolved to the raw .ts source files instead of compiled .d.ts declarations, skipLibCheck did not apply, causing TS2307 errors for devDependency imports like @webex/event-dictionary-ts. Adding "files": ["dist"] ensures only compiled output is published, so consumers always resolve to .d.ts files where skipLibCheck works.
1 parent 7e274bf commit 3856cbd

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

packages/@webex/internal-plugin-metrics/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
"main": "dist/index.js",
66
"devMain": "src/index.js",
77
"types": "dist/types/index.d.ts",
8+
"files": [
9+
"dist"
10+
],
811
"repository": {
912
"type": "git",
1013
"url": "https://github.com/webex/webex-js-sdk.git",

packages/@webex/plugin-meetings/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
"main": "dist/index.js",
1414
"types": "dist/types/index.d.ts",
1515
"devMain": "src/index.js",
16+
"files": [
17+
"dist"
18+
],
1619
"repository": {
1720
"type": "git",
1821
"url": "https://github.com/webex/webex-js-sdk.git",

0 commit comments

Comments
 (0)