Skip to content

Use generate both node and react #375

Answered by ivanhofer
IRediTOTO asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @IRediTOTO,
currently the generator only supports a single adapter option.
But since the generated output doesn't change frequently, you could:

  1. run typesafe-i18n with the adapter option set to 'node'
  2. set the adapter to 'react' and leave it like this

Then you would have the i18n-node.ts and i18n-react.tsx file in your repo and you can use both at the same time.
The i18n-node.ts file itself gets not updated, but it will read the type information from a shared file that gets updated also when using any other adapter.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by IRediTOTO
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
implemented Available in latest version
2 participants