mirror of
https://github.com/status-im/react-native.git
synced 2025-01-15 12:05:06 +00:00
5ac77062be
Summary: Adds a new URL option to the packager server called "assetPlugin". This can be a name of a Node module or multiple Node modules (`assetPlugin=module1&assetPlugin=module2`). Each plugin is loaded using `require()` and is expected to export a function. Each plugin function is invoked with an asset as the argument. The plugins may be async functions; the packager will properly wait for them to settle and will chain them. A plugin may be used to add extra metadata to an asset. For example it may add an array of hashes for all of the files belonging to an asset, or it may add the duration of a sound clip asset. Closes https://github.com/facebook/react-native/pull/9993 Differential Revision: D3895384 Pulled By: davidaurelio fbshipit-source-id: 0afe24012fc54b6d18d9b2df5f5675d27ea58320