Skip to content

Commit a256342

Browse files
authored
Document enableBundleCompression (facebook#4519)
* Document `enableBundleCompression` Add documentation for https://github.com/facebook/react-native/pull/49449/files * Update docs/react-native-gradle-plugin.md
1 parent c3a3614 commit a256342

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/react-native-gradle-plugin.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,14 @@ The list of flags to pass to `hermesc`. By default is `["-O", "-output-source-ma
150150
hermesFlags = ["-O", "-output-source-map"]
151151
```
152152

153+
### `enableBundleCompression`
154+
155+
Whether the Bundle Asset should be compressed when packaged into a `.apk`, or not.
156+
157+
Disabling compression for the `.bundle` allows it to be directly memory-mapped to RAM, hence improving startup time - at the cost of a larger resulting app size on disk. Please note that the `.apk` download size will be mostly unaffected as the `.apk` files are compressed before downloading
158+
159+
By default this is disabled, and you should not turn it on, unless you're really concerned about disk space for your application.
160+
153161
## Using Flavors & Build Variants
154162

155163
When building Android apps, you might want to use [custom flavors](https://developer.android.com/studio/build/build-variants#product-flavors) to have different versions of your app starting from the same project.

0 commit comments

Comments
 (0)