nuxt-modules / i18n

I18n module for Nuxt
https://i18n.nuxtjs.org
MIT License
1.65k stars 465 forks source link

Any ways to specify server-side-only translations that are not included in the frontend bundle? #2998

Closed raf202 closed 3 days ago

raf202 commented 4 days ago

Using Nuxt 3, we're specifying some translation files that are only used in our backend API (server folder) and returned via API. The problem is that they're also getting included and loaded in the frontend code, even though nothing on our frontend calls these directly. These files can have a LOT of translation strings and become huge with size, so we're trying to make it load only on the server side to prevent our frontend application becoming too resource consuming.

Any ideas how to achieve this?

kazupon commented 3 days ago

Thank you for your reporting. This is not github issue, is question or consultation. I'll move to github dicussions