mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
3c5a8290ae
Summary: Part of the [monorepo RFC](https://github.com/react-native-community/discussions-and-proposals/blob/04671deebe4ef2af782e281bbd912a8597c5af96/proposals/0006-react-native-monorepo.md) ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [General] [Changed] - Rename assets to assets-registry Pull Request resolved: https://github.com/facebook/react-native/pull/34572 Reviewed By: cortinico Differential Revision: D39235817 Pulled By: hoxyq fbshipit-source-id: ff4d4a7ff980d3fc6e28b83ad3b36250eba79fc3
29 lines
710 B
JavaScript
29 lines
710 B
JavaScript
/**
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @format
|
|
* @flow strict
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
// This is a stub for flow to make it understand require('./icon.png')
|
|
// See metro/src/Bundler/index.js
|
|
|
|
const AssetRegistry = require('@react-native/assets-registry/registry');
|
|
|
|
module.exports = (AssetRegistry.registerAsset({
|
|
__packager_asset: true,
|
|
fileSystemLocation: '/full/path/to/directory',
|
|
httpServerLocation: '/assets/full/path/to/directory',
|
|
width: 100,
|
|
height: 100,
|
|
scales: [1, 2, 3],
|
|
hash: 'nonsense',
|
|
name: 'icon',
|
|
type: 'png',
|
|
}): number);
|