Whitelist the 'pdf' extension in the packager

Summary:The WebView component in iOS currently does not support displaying PDFs without providing a remote URI or manually including the assets in the xcodeproj itself. This is because the packager has not whitelisted the 'pdf' extension.

I've gone ahead and whitelisted the 'pdf extension according to the recommendation by nicklockwood

GH comment: https://github.com/facebook/react-native/issues/1846#issuecomment-199302488
Closes https://github.com/facebook/react-native/pull/7004

Differential Revision: D3196019

Pulled By: nicklockwood

fb-gh-sync-id: 10a86a9232095f98f277506141de0b8af5b21ab4
fbshipit-source-id: 10a86a9232095f98f277506141de0b8af5b21ab4
This commit is contained in:
Leland Richardson 2016-04-19 03:51:45 -07:00 committed by Facebook Github Bot 7
parent b5375bdc09
commit e9398c7926
3 changed files with 3 additions and 3 deletions

View File

@ -81,7 +81,7 @@ esproposal.class_instance_fields=enable
munge_underscores=true
module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub'
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\)$' -> 'RelativeImageStub'
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
suppress_type=$FlowIssue
suppress_type=$FlowFixMe

View File

@ -83,7 +83,7 @@ function getPackagerServer(args, config) {
'bmp', 'gif', 'jpg', 'jpeg', 'png', 'psd', 'svg', 'webp', // Image formats
'm4v', 'mov', 'mp4', 'mpeg', 'mpg', 'webm', // Video formats
'aac', 'aiff', 'caf', 'm4a', 'mp3', 'wav', // Audio formats
'html', // Document formats
'html', 'pdf', // Document formats
],
resetCache: args.resetCache || args['reset-cache'],
verbose: args.verbose,

View File

@ -62,7 +62,7 @@ const validateOpts = declareOpts({
'bmp', 'gif', 'jpg', 'jpeg', 'png', 'psd', 'svg', 'webp', // Image formats
'm4v', 'mov', 'mp4', 'mpeg', 'mpg', 'webm', // Video formats
'aac', 'aiff', 'caf', 'm4a', 'mp3', 'wav', // Audio formats
'html', // Document formats
'html', 'pdf', // Document formats
],
},
transformTimeoutInterval: {