-
Notifications
You must be signed in to change notification settings - Fork 382
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
RFC: Split macro to vanilla js + react #1361
Comments
This is a good idea, I already thought exactly about a Vue package and other frameworks. I think we can follow the existing naming:
Found one old issue related to this topic - #708 (Added to the issue description) |
For macro to work, it should end on So |
I definitely like this idea. I always wanted to make this library framework-agnostic. Using single macro package for only for simplicity, but I understand it can be annoying. |
I currently need this feature. I'm in a Vue project and I do not want to install the all React ecosystem. How can I help? Is there some plan I can follow? |
I think we can plan that for lingui v5. I see this in the following manner: The actual transform of code would be kept as-is, e.q. one transform process both js and jsx (react) nodes. The only changes would be in typescript typings. Lingui would have packages called:
|
Ok so if I add the vuejs support in I could already do it with a |
Would be implemented in lingui v5 |
Current macro assuming usage only with React. But there are cases where people want to use it with vanilla js or even different framework.
Current macro depending on
@types/react
and@lingui/react
which brings react to the host project which might be unwanted behavior.There was an attempt to fix this here #936
But the solution is far from perfect.
I propose to split macro into two different packages:
@lingui/js-macro
(or just macro)@lingui/react-macro
This in future would allow us to adopt other jsx based-frameworks.
An automatic codemod could be written to help people migrate to the new version.
Related to:
The text was updated successfully, but these errors were encountered: