Skip to content

Commit

Permalink
Assume *.ktx assets are packaged as Android drawables
Browse files Browse the repository at this point in the history
Summary:
Updates React Native's asset runtime to look for `*.ktx` assets under `drawable-*` on Android.

This by itself does **not**:
1. Add runtime support for loading KTX images.
2. Update the OSS packager to actually package KTX files as drawables. (This will need to happen [here](https://github.com/react-native-community/cli/blob/cddb0c3fb06ef949ea689221c6167147af40e37f/packages/cli-plugin-metro/src/commands/bundle/assetPathUtils.ts#L39-L46).)

Changelog:

[Android][Changed] Assume *.ktx assets are packaged as Android drawables

Reviewed By: javache

Differential Revision: D32597214

fbshipit-source-id: 25007c1e0eba769ce9e484fa20da5f26890eb38d
  • Loading branch information
motiz88 authored and facebook-github-bot committed Nov 22, 2021
1 parent 5273553 commit cb610dd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/assets/path-support.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ const drawableFileTypes = new Set([
'gif',
'jpeg',
'jpg',
'ktx',
'png',
'svg',
'webp',
Expand Down

0 comments on commit cb610dd

Please sign in to comment.