File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 154
154
},
155
155
"rncli" : {
156
156
"default" : false
157
+ },
158
+ "disableHermes" : {
159
+ "default" : false
157
160
}
158
161
}
159
162
},
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ async function runReactNativeBundleCommand({
30
30
platform,
31
31
sourcemapOutput,
32
32
config,
33
+ disableHermes,
33
34
cli,
34
35
} : {
35
36
bundleName : string ;
@@ -39,6 +40,7 @@ async function runReactNativeBundleCommand({
39
40
platform : string ;
40
41
sourcemapOutput : string ;
41
42
config ?: string ;
43
+ disableHermes ?: boolean ;
42
44
cli : {
43
45
taro ?: boolean ;
44
46
expo ?: boolean ;
@@ -84,7 +86,7 @@ async function runReactNativeBundleCommand({
84
86
require . resolve ( '@expo/cli/package.json' , {
85
87
paths : [ process . cwd ( ) ] ,
86
88
} ) ,
87
- ) ,
89
+ ) . toString ( ) ,
88
90
) . version ;
89
91
// expo cli 0.10.17 (expo 49) 开始支持 bundle:embed
90
92
if ( semverSatisfies ( expoCliVersion , '>= 0.10.17' ) ) {
@@ -221,7 +223,9 @@ async function runReactNativeBundleCommand({
221
223
} else {
222
224
let hermesEnabled : boolean | undefined = false ;
223
225
224
- if ( platform === 'android' ) {
226
+ if ( disableHermes ) {
227
+ hermesEnabled = false ;
228
+ } else if ( platform === 'android' ) {
225
229
const gradlePropeties = await new Promise < {
226
230
hermesEnabled ?: boolean ;
227
231
} > ( ( resolve ) => {
@@ -904,6 +908,7 @@ export const commands = {
904
908
taro,
905
909
expo,
906
910
rncli,
911
+ disableHermes,
907
912
} = translateOptions ( {
908
913
...options ,
909
914
platform,
@@ -932,6 +937,7 @@ export const commands = {
932
937
outputFolder : intermediaDir ,
933
938
platform,
934
939
sourcemapOutput : sourcemap || sourcemapPlugin ? sourcemapOutput : '' ,
940
+ disableHermes,
935
941
cli : {
936
942
taro,
937
943
expo,
You can’t perform that action at this time.
0 commit comments