-
Notifications
You must be signed in to change notification settings - Fork 396
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(babel-plugin-lingui-macro): allow to configure macro packages #2196
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
size-limit report 📦
|
@andrii-bodnar anything else to get this merged? |
@timofei-iatsenko looks generally good to me. The only thing that looks confusing and misleading is some of the naming. I mean this example: defineConfig({
macro: {
reactPackage: ['@lingui-solid/solid/macro']
}
}) React package -> Solid package A better approach might be to use more generic property names that don't tie to a specific framework. What do you think? |
@andrii-bodnar might be confusing, but from other side it's a mapping and it looks logical here: macro: {
corePackage: [/*legacy*/ "@lingui/macro", "@lingui/core/macro"],
reactPackage: [/*legacy*/ "@lingui/macro", "@lingui/react/macro"],
}, Do you have any better name in mind? |
Was also thinking about |
@andrii-bodnar fixed, also added docs to the website and copied more inline docs from website to the config types. |
@andrii-bodnar i also had to remove the |
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.
@timofei-iatsenko thank you!
Description
Part of work to improve extensibility of lingui and allow it be extended by 3rd party libraries without copy/pastig code
More info is here: #2101 (comment)
This feature not particularly useful for end-users but would be valuable for integration authors
Feature description
Adds two new configuration properties for LinguiConfig, these properties allow overriding default package names for lingui macro.
So using this feature, integration with SolidJS could be simplifed to:
Instead of copy/pasting the whole babel extractor and macro code.
The setting affects:
Types of changes
Fixes # (issue)
Checklist