Skip to content

Commit af6450c

Browse files
idefacebook-github-bot
authored andcommitted
Add back support for the assetPlugin option
Summary: **Summary** Metro used to have support for "asset plugins", which allowed developers to specify arbitrary JS modules that could export a function for adding more fields to asset data objects. Some of this functionality was removed in the delta bundler work -- this PR adds it back. **Test plan** Made existing unit tests pass and added unit tests to test asset plugin behavior. Also tested E2E in a React Native project by adding `assetPlugin=/path/to/pluginModule` to a JS bundle URL and ensuring that the plugin ran. Closes facebook/metro#118 Differential Revision: D6711094 Pulled By: rafeca fbshipit-source-id: f42c54cfd11bac5103194f85083084eef25fa3cd
1 parent 2a22d99 commit af6450c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: jest/preprocessor.js

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ module.exports = {
5252
filename: file,
5353
localPath: file,
5454
options: {
55+
assetDataPlugins: [],
5556
dev: true,
5657
inlineRequires: true,
5758
minify: false,

0 commit comments

Comments
 (0)