From be1843cddcff78802cd774c8a75fe8647df0135d Mon Sep 17 00:00:00 2001 From: James Ide Date: Tue, 20 Jun 2017 11:04:53 -0700 Subject: [PATCH] Add font file extensions (otf and ttf) to default supported extensions Summary: This makes it a little more convenient to dynamically load font files. We currently do with help from the "assetExts" config flag and find that we specify it a lot. Would you be interested in taking this PR? Closes https://github.com/facebook/metro-bundler/pull/14 Differential Revision: D5284158 Pulled By: jeanlauliac fbshipit-source-id: d102cf4776b9e3659c33e15d9d72f7ea0ea52d57 --- packages/metro-bundler/src/defaults.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/metro-bundler/src/defaults.js b/packages/metro-bundler/src/defaults.js index f5288937..bd1e73b4 100644 --- a/packages/metro-bundler/src/defaults.js +++ b/packages/metro-bundler/src/defaults.js @@ -15,6 +15,7 @@ exports.assetExts = [ 'm4v', 'mov', 'mp4', 'mpeg', 'mpg', 'webm', // Video formats 'aac', 'aiff', 'caf', 'm4a', 'mp3', 'wav', // Audio formats 'html', 'pdf', // Document formats + 'otf', 'ttf', // Font formats ]; exports.sourceExts = ['js', 'json'];