-
Notifications
You must be signed in to change notification settings - Fork 4
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: improve algorithm #10
refactor: improve algorithm #10
Conversation
Is there perhaps a timeline estimate with regards to merging this PR to main? I think it's an awesome improvement and I'd be keen to try it out in production! 🙌 |
You can copy the source and pass it to Babel if you want to try right now, but unfortunately I just left a position where I wanted to field test this. Just integration testing for different tools and the effectiveness of tree-shaking, don't see any other blockers. |
Gonna try to review this week 🤞. I don't see major blockers. But this is a rewrite of the logic and I want to make sure it's not breaking any existing use-cases. |
Hello! Is there any time estimate for this? It would be so great to use |
I did a lot of plumbing work upstream with tree-shaking and can verify that works as intended with https://github.com/CodyJasonBennett/treeshake-cli. |
I'm taking about using |
The previous blockers for this PR was whether it produces valid code after tree-shaking (mostly important for libraries which use this plugin) and is configurable between build tools. I've cleared both so it's just pending review from @umar-ahmed. |
Committing to reviewing this weekend. You have my permission to keep pinging me to get it to the finish line 😛 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@CodyJasonBennett Looks good overall. I had a couple comments/questions. But I think we can get this merged and released soon.
We did lose one bit of functionality, which is being able to import components from packages other than three
. I think it's fine if we omit this for now, but I just wanted to call it out for future readers.
I didn't understand this use-case or the need to begin with rather. This plugin assumes a well-formed program which means it must be portable with/without it. |
Co-authored-by: Umar Ahmed <umar.ahmed1998@gmail.com>
Published to NPM and created a release on GitHub: https://github.com/pmndrs/react-three-babel/releases/tag/v1.0.0 |
Rewrites the plugin and its test suite to handle member, dynamic, and template JSX expressions in addition to tree-shaking the default
<Canvas />
. This removes all of the limitations of the plugin, so I've opted to cleanup the README.