Skip to content

feat: add linguiMacroSwcPlugin() helper#212

Merged
andrii-bodnar merged 6 commits into
lingui:mainfrom
mogelbrod:linguiSwcOptions
May 22, 2026
Merged

feat: add linguiMacroSwcPlugin() helper#212
andrii-bodnar merged 6 commits into
lingui:mainfrom
mogelbrod:linguiSwcOptions

Conversation

@mogelbrod
Copy link
Copy Markdown
Contributor

@mogelbrod mogelbrod commented May 21, 2026

  • Export linguiMacroSwcPlugin() helper from @lingui/swc-plugin/options that enables automatic deriving of SWC related options from the Lingui config file
  • Add @lingui/conf 5 || 6 as a dependency to access the config through
  • Restructure the README file, grouping config examples together and converting comment based option docs into structured content

Idea from this discord thread

@codecov
Copy link
Copy Markdown

codecov Bot commented May 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.49%. Comparing base (d987f1c) to head (9d1048c).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #212   +/-   ##
=======================================
  Coverage   94.49%   94.49%           
=======================================
  Files           9        9           
  Lines        2161     2161           
=======================================
  Hits         2042     2042           
  Misses        119      119           
Flag Coverage Δ
unittests 94.49% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@timofei-iatsenko timofei-iatsenko changed the title feat: add linguiSwcOptions helper feat: add linguiMacroSwcPlugin() helper May 21, 2026
Copy link
Copy Markdown
Contributor Author

@mogelbrod mogelbrod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look great @timofei-iatsenko!

Comment thread README.md
Comment on lines +58 to +59
> **Note**
> Consult with full working example for NextJS in the `/examples` folder in this repo.
Copy link
Copy Markdown
Collaborator

@timofei-iatsenko timofei-iatsenko May 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andrii-bodnar i'm going to replace this in the next iteration with a link to main js repo example, and delete nextjs example from this repo. I'm not using for testing this example anymore, the integration now is tested using a e2e test.

I'm going to do this when this feature would be published and example itself will use this helper.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me

@andrii-bodnar andrii-bodnar merged commit cf59474 into lingui:main May 22, 2026
4 checks passed
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.

3 participants