lingui / js-lingui

🌍 📖 A readable, automated, and optimized (3 kb) internationalization for JavaScript
https://lingui.dev
MIT License
4.63k stars 382 forks source link

feat(vite-plugin): add error handling for dynamic import of @lingui/macro #2056

Open maastrich opened 1 month ago

maastrich commented 1 month ago

Description

Make sure the user understands why @lingui/macro is not handled by babel/swc when dynamically imported.

Types of changes

Checklist

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
js-lingui ✅ Ready (Inspect) Visit Preview Oct 18, 2024 8:45am
github-actions[bot] commented 1 month ago

size-limit report 📦

Path Size
./packages/core/dist/index.mjs 2.88 KB (0%)
./packages/detect-locale/dist/index.mjs 723 B (0%)
./packages/react/dist/index.mjs 1.68 KB (0%)
./packages/remote-loader/dist/index.mjs 7.26 KB (0%)
timofei-iatsenko commented 1 month ago

LGTM, thanks for contribution

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Project coverage is 75.45%. Comparing base (d6b9698) to head (5f31983). Report is 70 commits behind head on main.

Files with missing lines Patch % Lines
packages/vite-plugin/src/index.ts 0.00% 2 Missing :warning:
...ite-plugin/test/dynamic-macro-error/vite.config.ts 0.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2056 +/- ## ========================================== - Coverage 76.65% 75.45% -1.20% ========================================== Files 81 89 +8 Lines 2090 2176 +86 Branches 533 552 +19 ========================================== + Hits 1602 1642 +40 - Misses 375 423 +48 + Partials 113 111 -2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

timofei-iatsenko commented 1 month ago

@maastrich are you going to add something to this PR or you finished? We are preparing v5 release and it would be better to switch it to the next branch.

andrii-bodnar commented 2 weeks ago

Hi @maastrich, is there anything we can do to move this PR forward?