Skip to content
Discussion options

You must be logged in to vote

Interestingly, Expo recommends typesafe-i18n in this guide: https://docs.expo.dev/guides/localization/#complete-example (see where it says "Using other translation libraries"). It mentions that you need to be using Hermes as your javascript engine (easy to configure in expo), and I suppose the implicit requirement is that you're on the latest version of Expo (SDK 47 at time of writing).

However, that wasn't enough to get typesafe-i18n working. There were 2 issues:

CJS files

As @whalemare points out, before metro version 0.72.0, you need to add 'cjs' to your metro.config.js under sourceExts. Something like:

const { getDefaultConfig } = require('expo/metro-config');

module.exports = (() =>…

Replies: 5 comments 8 replies

Comment options

You must be logged in to vote
1 reply
@ivanhofer
Comment options

Comment options

You must be logged in to vote
3 replies
@ivanhofer
Comment options

@whalemare
Comment options

@ivanhofer
Comment options

Comment options

You must be logged in to vote
4 replies
@ivanhofer
Comment options

@chriscoomber
Comment options

@chriscoomber
Comment options

@ivanhofer
Comment options

Answer selected by ivanhofer
Comment options

You must be logged in to vote
0 replies
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
None yet
5 participants