Created
April 5, 2021 20:54
-
-
Save eugenehp/0a12d427fdfd1a737ccdbc7e4dbac667 to your computer and use it in GitHub Desktop.
react-native-randomness example metro config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path'); | |
const pak = require('../package.json'); | |
const root = path.resolve(__dirname, '..'); | |
const modules = Object.keys({ | |
...pak.peerDependencies, | |
}); | |
module.exports = { | |
projectRoot: __dirname, | |
watchFolders: [root], | |
resolver: { | |
extraNodeModules: modules.reduce((acc, name) => { | |
acc[name] = path.join(__dirname, 'node_modules', name); | |
return acc; | |
}, {}), | |
}, | |
transformer: { | |
getTransformOptions: async () => ({ | |
transform: { | |
experimentalImportSupport: false, | |
inlineRequires: true, | |
}, | |
}), | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment