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

refactor: avoid using export * as for tree-shaking friendly #28

Merged
merged 3 commits into from
Dec 25, 2024

Conversation

PuruVJ
Copy link
Contributor

@PuruVJ PuruVJ commented Dec 25, 2024

Shipping the unstable module as export * as unstable from './unstable/index.js' does not let this library be tree-shaken.

This PR re-exports all methods from unstable with an unstable_ prefix, which makes it tree-shakeable once again, while only needing to replace one character([dot] with _ underscore)

Fixes #27

@PuruVJ PuruVJ mentioned this pull request Dec 25, 2024
src/index.ts Show resolved Hide resolved
@johnsoncodehk johnsoncodehk changed the title Replace unstable[dot] with unstable_ refactor: avoid using export * as for tree-shaking friendly Dec 25, 2024
@johnsoncodehk johnsoncodehk merged commit bfafe1f into stackblitz:master Dec 25, 2024
3 checks passed
@johnsoncodehk
Copy link
Collaborator

If we change the export interface we have to release 0.5 to avoid breakage, so we have simply removed export * as usage for now to avoid problems.

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.

Tree-shakeable
2 participants