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

feat(ts): expose built files in umd #4844

Merged
merged 2 commits into from
Aug 24, 2021
Merged

feat(ts): expose built files in umd #4844

merged 2 commits into from
Aug 24, 2021

Conversation

Haroenv
Copy link
Contributor

@Haroenv Haroenv commented Aug 23, 2021

Summary

Exposes the entry point for umd for each of the umd entry points.

This is achieved using the dtsRollup feature of api-extractor, which isn't needed for the es build, as local files work perfectly fine in that case.

Make sure to check the generated files when reviewing this PR

Result

A situation like algolia/create-instantsearch-app#464 is done easier by simply declaring what's import from the umd

This can be achieved using the dtsRollup feature of api-extractor, which isn't needed for the es build, as local files work perfectly fine in that case.

Make sure to check the generated files when reviewing this PR
@Haroenv Haroenv requested review from a team, eunjae-lee and francoischalifour and removed request for a team August 23, 2021 12:27
@codesandbox-ci
Copy link

codesandbox-ci bot commented Aug 23, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 6c0279c:

Sandbox Source
InstantSearch.js Configuration

@Haroenv
Copy link
Contributor Author

Haroenv commented Aug 23, 2021

);
shell.cp(
path.join(__dirname, '../../dist/instantsearch.production.d.ts'),
path.join(__dirname, '../../dist/instantsearch.development.min.d.ts')
Copy link
Contributor

Choose a reason for hiding this comment

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

in which case do people need development.d.ts file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

all the files are the same, but typescript works by matching a .d.ts file to a .js file, so if you're importing /dist/development.min.js then the .d.ts is needed for that to work

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for explaining!

@Haroenv Haroenv requested a review from eunjae-lee August 23, 2021 13:26
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.

3 participants