Initial commit
Generated by create-expo-module 56.0.3.
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
// Learn more https://docs.expo.io/guides/customizing-metro
|
||||
const { getDefaultConfig } = require('expo/metro-config');
|
||||
const path = require('path');
|
||||
|
||||
const config = getDefaultConfig(__dirname);
|
||||
|
||||
// npm v7+ will install ../node_modules/react and ../node_modules/react-native because of peerDependencies.
|
||||
// To prevent the incompatible react-native between ./node_modules/react-native and ../node_modules/react-native,
|
||||
// excludes the one from the parent folder when bundling.
|
||||
config.resolver.blockList = [
|
||||
...Array.from(config.resolver.blockList ?? []),
|
||||
// On windows the path will resolve with `\`. We need to escape it with `\\` for the RegExp.
|
||||
new RegExp(path.resolve('..', 'node_modules', 'react').replace(/\\/g, '\\\\')),
|
||||
new RegExp(path.resolve('..', 'node_modules', 'react-native').replace(/\\/g, '\\\\')),
|
||||
];
|
||||
|
||||
config.resolver.nodeModulesPaths = [
|
||||
path.resolve(__dirname, './node_modules'),
|
||||
path.resolve(__dirname, '../node_modules'),
|
||||
];
|
||||
|
||||
config.resolver.extraNodeModules = {
|
||||
'jecnaapi-react-native': '..',
|
||||
};
|
||||
|
||||
config.watchFolders = [path.resolve(__dirname, '..')];
|
||||
|
||||
config.transformer.getTransformOptions = async () => ({
|
||||
transform: {
|
||||
experimentalImportSupport: false,
|
||||
inlineRequires: true,
|
||||
},
|
||||
});
|
||||
|
||||
module.exports = config;
|
||||
Reference in New Issue
Block a user