Hackfix to facebook/react-native#42024
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
const {withAndroidManifest} = require('expo/config-plugins')
|
const {withAndroidManifest, withAppBuildGradle} = require('expo/config-plugins')
|
||||||
|
|
||||||
module.exports = function withAndroidManifestPlugin(appConfig) {
|
module.exports = function withAndroidManifestPlugin(appConfig) {
|
||||||
return withAndroidManifest(appConfig, function (decoratedAppConfig) {
|
appConfig = withAndroidManifest(appConfig, function (decoratedAppConfig) {
|
||||||
try {
|
try {
|
||||||
decoratedAppConfig.modResults.manifest.application[0].$[
|
decoratedAppConfig.modResults.manifest.application[0].$[
|
||||||
'android:largeHeap'
|
'android:largeHeap'
|
||||||
@@ -11,4 +11,21 @@ module.exports = function withAndroidManifestPlugin(appConfig) {
|
|||||||
}
|
}
|
||||||
return decoratedAppConfig
|
return decoratedAppConfig
|
||||||
})
|
})
|
||||||
|
|
||||||
|
appConfig = withAppBuildGradle(appConfig, function (decoratedAppConfig) {
|
||||||
|
// HACK
|
||||||
|
// Workaround for https://github.com/facebook/react-native/issues/42024
|
||||||
|
// Remove when React Native resolves this issue
|
||||||
|
// -prf
|
||||||
|
const MATCH_STRING = 'defaultConfig {\n'
|
||||||
|
const str = decoratedAppConfig.modResults.contents
|
||||||
|
const index = str.indexOf(MATCH_STRING) + MATCH_STRING.length
|
||||||
|
decoratedAppConfig.modResults.contents = `${str.slice(
|
||||||
|
0,
|
||||||
|
index,
|
||||||
|
)}\nresConfigs "en", "hi", "ja", "fr", "de", "es"\n${str.slice(index)}`
|
||||||
|
return decoratedAppConfig
|
||||||
|
})
|
||||||
|
|
||||||
|
return appConfig
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user