Closed galnoba closed 1 year ago
@galnoba You need to add tell Metro to bundle .mjs files, for example with metro.config.js
:
const { getDefaultConfig } = require('metro-config')
module.exports = (async () => {
const {
resolver: { assetExts, sourceExts }
} = await getDefaultConfig()
return {
resolver: {
sourceExts: [...sourceExts, 'mjs']
},
...
}
})()
Closing this, as it's a build pipeline configuration. I've updated the readme file to reflect this config: https://github.com/fnando/i18n/commit/d4a14ca41d815403ee331f0e63d9b41aa612cbbc
Description
The bundler fails with the error:
Unable to resolve "make-plural" from "node_modules\i18n-js\dist\import\Pluralization.js
How to reproduce
Add i18n-js to an expo project, run yarn build, then run npx expo start.
What do you expect
Never had issues with i18n-js when bundling
What happened instead
The bundler failed