Skip to content

Commit 94116db

Browse files
andrewlinfootfacebook-github-bot
authored andcommitted
Add documentation for supporting custom require types
Summary: See facebook/metro#4 Closes #14433 Differential Revision: D5230109 Pulled By: shergin fbshipit-source-id: f797218ad214dc3912ab3a9bcf837103502bfce4
1 parent 2e42842 commit 94116db

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/Images.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ Note that image sources required this way include size (width, height) info for
6767

6868
## Static Non-Image Resources
6969

70-
The `require` syntax described above can be used to statically include audio, video or document files in your project as well. Most common file types are supported including `.mp3`, `.wav`, `.mp4`, `.mov`, `.html` and `.pdf` (see the [packager defaults](https://github.com/facebook/react-native/blob/master/packager/defaults.js) file for the full list).
70+
The `require` syntax described above can be used to statically include audio, video or document files in your project as well. Most common file types are supported including `.mp3`, `.wav`, `.mp4`, `.mov`, `.html` and `.pdf`. See [packager defaults](https://github.com/facebook/metro-bundler/blob/master/packages/metro-bundler/src/defaults.js#L13-L18) for the full list.
71+
72+
You can add support for other types by creating a packager config file (see the [packager config file](https://github.com/facebook/react-native/blob/master/local-cli/util/Config.js#L34-L39) for the full list of configuration options).
7173

7274
A caveat is that videos must use absolute positioning instead of `flexGrow`, since size info is not currently passed for non-image assets. This limitation doesn't occur for videos that are linked directly into Xcode or the Assets folder for Android.
7375

0 commit comments

Comments
 (0)