diff options
author | Ivan Chen <ivan@thetaggid.com> | 2020-10-08 16:26:16 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-08 16:26:16 -0400 |
commit | 6e3fe33e5e1d3818ef8bb942c1544581ab8c0688 (patch) | |
tree | 11d86adf5ef56efadf6a1edafdc33fdba20fab80 /metro.config.js | |
parent | cf0f22d4e86e44efee6ae1d4f23e0642df117b79 (diff) |
[TMA-229] Moments Barebones (#50)
* added react native svg transformation to support svg icons
* finished moments barebones view
* resolved a warning from the svg file
Diffstat (limited to 'metro.config.js')
-rw-r--r-- | metro.config.js | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/metro.config.js b/metro.config.js index 13a96421..8d872624 100644 --- a/metro.config.js +++ b/metro.config.js @@ -5,13 +5,23 @@ * @format */ -module.exports = { - transformer: { - getTransformOptions: async () => ({ +const {getDefaultConfig} = require('metro-config'); + +module.exports = (async () => { + const { + resolver: {sourceExts, assetExts}, + } = await getDefaultConfig(); + return { + transformer: { transform: { experimentalImportSupport: false, inlineRequires: false, }, - }), - }, -}; + babelTransformerPath: require.resolve('react-native-svg-transformer'), + }, + resolver: { + assetExts: assetExts.filter((ext) => ext !== 'svg'), + sourceExts: [...sourceExts, 'svg'], + }, + }; +})(); |