Skip to content

Commit

Permalink
Remove async from metro config
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewGable committed Mar 8, 2021
1 parent aece23d commit 0a726a3
Showing 1 changed file with 15 additions and 20 deletions.
35 changes: 15 additions & 20 deletions metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,18 @@

const {getDefaultConfig} = require('metro-config');

module.exports = (async () => {
const {
resolver: {assetExts},
} = await getDefaultConfig();
return {
resolver: {
assetExts: assetExts.filter(ext => ext !== 'svg'),
sourceExts: ['jsx', 'js', 'ts', 'tsx', 'json', 'svg'],
},
transformer: {
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: false,
},
}),
babelTransformerPath: require.resolve('react-native-svg-transformer'),
},
};
})();
module.exports = (() => getDefaultConfig().then(config => ({
resolver: {
assetExts: config.resolver.assetExts.filter(ext => ext !== 'svg'),
sourceExts: ['jsx', 'js', 'ts', 'tsx', 'json', 'svg'],
},
transformer: {
getTransformOptions: () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: false,
},
}),
babelTransformerPath: require.resolve('react-native-svg-transformer'),
},
})))();

0 comments on commit 0a726a3

Please sign in to comment.