Skip to content

Commit

Permalink
Merge pull request zingolabs#773 from dorianvp/fix_metro_config
Browse files Browse the repository at this point in the history
Fix metro config
  • Loading branch information
juanky201271 authored Feb 12, 2025
2 parents e2dc035 + 1c9c696 commit 4a4afcc
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions metro.config.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config');

const { resolver: defaultResolver } = getDefaultConfig.getDefaultValues();

/**
* Metro configuration
* https://reactnative.dev/docs/metro
*
* @type {import('metro-config').MetroConfig}
*/

/**
* See https://react-native-vision-camera.com/docs/guides/mocking for more information.
*/
const defaultConfig = getDefaultConfig(__dirname);

const config = {
resolver: {
...defaultResolver,
sourceExts: [process.env.RN_SRC_EXT && process.env.RN_SRC_EXT.split(','), ...defaultResolver.sourceExts],
...defaultConfig.resolver,
sourceExts: [
...(process.env.RN_SRC_EXT ? process.env.RN_SRC_EXT.split(',') : []),
...defaultConfig.resolver.sourceExts,
],
},
};

module.exports = mergeConfig(getDefaultConfig(__dirname), config);
module.exports = mergeConfig(defaultConfig, config);

0 comments on commit 4a4afcc

Please sign in to comment.