Skip to content

Bundle d.ts files using api-extractor#245

Closed
mjbvz wants to merge 1 commit into
microsoft:mainfrom
mjbvz:api-extractor
Closed

Bundle d.ts files using api-extractor#245
mjbvz wants to merge 1 commit into
microsoft:mainfrom
mjbvz:api-extractor

Conversation

@mjbvz
Copy link
Copy Markdown
Contributor

@mjbvz mjbvz commented Nov 27, 2024

This bundles all of the d.ts files into a single d.ts using api-extractor. This reduces the package size and also fixes the typings when using node16/nodenext. These module resolution strategies can't resolve the extension-less imports that are used the current version of the typings

This bundles all of the d.ts files into a single entrypoint using `api-extractor`. This reduces the package size and also fixes the typings when using `node16`/`nodenext`. These can't resolve the extension-less imports in current version of the  typings
Copy link
Copy Markdown
Member

@alexdima alexdima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if the extra api-extractor script is invoked as part of the build.

Comment thread package.json
"prepublishOnly": "tsc && webpack --progress",
"bundle": "webpack"
"prepublishOnly": "tsc && webpack --progress && npm run api-extractor",
"bundle": "webpack",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should npm run api-extractor be also invoked by the bundle script? The build files seem to invoke npm run bundle and I don't know if prepublishOnly is invoked as part of our npm package publishing. Maybe we can trigger a build to check the package contents? But that would require that you port your changes to a branch in this repository, since forks can't be built.

@mjbvz mjbvz mentioned this pull request Dec 13, 2024
@mjbvz
Copy link
Copy Markdown
Contributor Author

mjbvz commented Dec 13, 2024

Resubmitted as branch on main repo so we can create a test build : #246 Also added running api-extractor to bundle

@mjbvz mjbvz closed this Dec 13, 2024
auto-merge was automatically disabled December 13, 2024 00:20

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants