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

fix: Improve macro error #2049

Closed timofei-iatsenko closed 1 month ago

timofei-iatsenko commented 1 month ago

Description

webpack (and nextjs) for some reason doesn't read message from error but instead rethrow the first frame of the stacktrace

So this fix will turn error from this

wait  - compiling /examples (client and server)...
error - ./src/pages/examples.tsx
TypeError: Cannot read properties of undefined (reading 'find')

to this:

image

Types of changes

Fixes # (issue)

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 16, 2024 9:55am
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%)