// Extends Expo's default Metro config. The only customization is a `buffer`
// polyfill: whisper.rn (native) pulls in `safe-buffer`, which `require('buffer')`
// — a Node core module Metro doesn't ship for React Native. Aliasing it to the
// userland `buffer` package lets the native bundle resolve. Harmless on web.
const { getDefaultConfig } = require('expo/metro-config');

const config = getDefaultConfig(__dirname);

config.resolver.extraNodeModules = {
  ...(config.resolver.extraNodeModules || {}),
  buffer: require.resolve('buffer/'),
};

module.exports = config;
