Please sign in to comment.
Add "assetPlugin" option to allow arbitrary asset processing
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 #9993 Differential Revision: D3895384 Pulled By: davidaurelio fbshipit-source-id: 0afe24012fc54b6d18d9b2df5f5675d27ea58320
- Loading branch information...
Showing with 131 additions and 9 deletions.