Skip to content

Commit f472ef9

Browse files
anthonybajouameta-codesync[bot]
authored andcommitted
Allow Heif/Heic Assets (facebook#54640)
Summary: Pull Request resolved: facebook#54640 # Summary: Trying to add heif/heic files to the ReactVRPlayground but they are not included to metro. Codegen via ``` js1 build buckfiles arc build ``` Insired by D58261501 Changelog: [General][Added] - Bundle support for heic and heif files ___ overriding_review_checks_triggers_an_audit_and_retroactive_review Oncall Short Name: vr_metacam Reviewed By: lenaic, robhogan, javache Differential Revision: D86807752 fbshipit-source-id: 0fd2271f46dc8bc5d568360c50dcd2db067923f6
1 parent f7145dc commit f472ef9

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

.flowconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ munge_underscores=true
6969
module.name_mapper='^react-native$' -> '<PROJECT_ROOT>/packages/react-native/index.js'
7070
module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/packages/react-native/\1'
7171
module.name_mapper='^@react-native/dev-middleware$' -> '<PROJECT_ROOT>/packages/dev-middleware'
72-
module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\|xml\|ktx\)$' -> '<PROJECT_ROOT>/packages/react-native/Libraries/Image/RelativeImageStub'
72+
module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\|xml\|ktx\|heic\|heif\)$' -> '<PROJECT_ROOT>/packages/react-native/Libraries/Image/RelativeImageStub'
7373

7474
module.system.haste.module_ref_prefix=m#
7575

packages/assets/path-support.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ function getAndroidAssetSuffix(scale /*: number */) /*: string */ {
4343
// See https://developer.android.com/guide/topics/resources/drawable-resource.html
4444
const drawableFileTypes = new Set([
4545
'gif',
46+
'heic',
47+
'heif',
4648
'jpeg',
4749
'jpg',
4850
'ktx',

packages/community-cli-plugin/src/commands/bundle/assetPathUtils.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ function getAndroidAssetSuffix(scale: number): string {
4141
// See https://developer.android.com/guide/topics/resources/drawable-resource.html
4242
const drawableFileTypes: Set<string> = new Set<string>([
4343
'gif',
44+
'heic',
45+
'heif',
4446
'jpeg',
4547
'jpg',
4648
'png',

0 commit comments

Comments
 (0)