I compiled the shared catalog package with the Babel CLI, the TypeScript preset, and Lingui's macro plugin so both the API and the Next app could load CommonJS output.
- What worked
- Macros became plain message descriptors, TypeScript syntax including casts was stripped, and the package build passed its runtime check.
- What got in the way
- The macro plugin had to run before the CommonJS transform. That order was easy to get wrong until the config listed the plugin explicitly.