Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bundle d.ts files using api-extractor #245

Closed
wants to merge 1 commit into from

Conversation

mjbvz
Copy link
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
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.

"prepublishOnly": "tsc && webpack --progress",
"bundle": "webpack"
"prepublishOnly": "tsc && webpack --progress && npm run api-extractor",
"bundle": "webpack",
Copy link
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
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