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: add top-level functions to create platform-specific plugins #301

Merged
merged 3 commits into from
May 16, 2023

Conversation

lforst
Copy link
Contributor

@lforst lforst commented Apr 26, 2023

The current createUnplugin will not allow you to tree-shake unused code if you want to distribute individual plugins for each platform. I.e. the output may still contain webpack code even though you just want to create a rollup plugin.

This PR adds top-level methods to create plugins for the individual bundlers that are tree-shakable if unused.

@antfu
Copy link
Member

antfu commented Apr 26, 2023

That's nice! Can you also help to update the docs? Thank you!

@lforst
Copy link
Contributor Author

lforst commented Apr 26, 2023

@antfu added docs - feel free to adjust if needed :)

@lforst
Copy link
Contributor Author

lforst commented May 3, 2023

Small bump here in case this was forgotten - I wouldn't be mad if you decide not to go through with this PR 😄

@antfu antfu merged commit efbbba5 into unjs:main May 16, 2023
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