You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have multiple packages in a monorepo (two Next.js apps and some shared UI components). The UI package has shared translation messages. When running either of the two Next.js apps, I would like to be able to add the messages of the UI package to createMessagesDeclaration so that an additional .d.ts file will be created.
None yet. (For what it's worth, note that my shared UI package is not bundled or preprocessed in any way because I want to have get hot module reloading. So the two Next.js apps are using the shared code directly.)
The text was updated successfully, but these errors were encountered:
…epo support (#1700)
Resolves: #1699
This change renames "createMessagesDeclaration" to
"createMessagesDeclarations" and changes the type to an array. Each
entry of the array will be used to create message declaration files.
Supporting multiple message files helps to use next-intl in monorepo
setups.
Since v4 is in beta, I renamed the property and removed support for a
single string. To me, clean types lead to cleaner code. If compatibility
is a more of a concern during the beta phase, I could not change the
property name and keep the support for single strings. Please let me
know.
---------
Co-authored-by: Jan Amann <jan@amann.work>
Is your feature request related to a problem? Please describe.
I love the type-safety that "createMessagesDeclaration" enables(https://v4.next-intl.dev/docs/workflows/typescript#messages-arguments)!
I have multiple packages in a monorepo (two Next.js apps and some shared UI components). The UI package has shared translation messages. When running either of the two Next.js apps, I would like to be able to add the messages of the UI package to createMessagesDeclaration so that an additional .d.ts file will be created.
Describe the solution you'd like
Suggestion:
Describe alternatives you've considered
None yet. (For what it's worth, note that my shared UI package is not bundled or preprocessed in any way because I want to have get hot module reloading. So the two Next.js apps are using the shared code directly.)
The text was updated successfully, but these errors were encountered: