1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee

chore(example): update metro.config.

This commit is contained in:
jaywcjlove 2022-08-05 17:57:49 +08:00
parent fead1627a7
commit c49fb0e142

View File

@ -3,13 +3,19 @@
* https://github.com/facebook/react-native
*/
const path = require('path');
module.exports = {
transformer: {
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: true,
},
}),
// workaround for an issue with symlinks encountered starting with
// metro@0.55 / React Native 0.61
// (not needed with React Native 0.60 / metro@0.54)
resolver: {
extraNodeModules: new Proxy(
{},
{get: (_, name) => path.resolve('.', 'node_modules', name)},
),
},
// quick workaround for another issue with symlinks
watchFolders: ['.', '..'],
};