You can override the original configuration rn-cli.config.jsin rn-cli.config.jsthe root of the project as follows:
const { getDefaultConfig } = require('metro-config')
module.exports = (async () => {
const {
resolver: {
sourceExt
}
} = await getDefaultConfig()
return {
resolver: {
sourceExts: ['xyz.js', ...sourceExts]
}
}
})()
sourceExt platforms sourceExt, , , ( , ios 'android, RN ).
sourceExts , , ['js', 'json', 'ts', 'tsx']. ['xyz.js', 'js', 'json', 'ts', 'tsx'], RN *.xyz.js *.xyz.js, .