Files
wisp/metro.config.js
NilsBriggen 7a1e6b06c1
CI / test (push) Successful in 22s
CI / deploy-web (push) Successful in 34s
CI / build-apk (push) Failing after 3h1m42s
fix(android): working signed release APK
- docker/android.Dockerfile: install nodejs (image ships Bun; ci-android-sign.sh
  patches build.gradle with a Node script).
- buffer polyfill: whisper.rn -> safe-buffer requires Node's `buffer`, absent in
  Metro/RN. Add `buffer` dep, alias it in metro.config.js, set the global in
  _layout. Web export unaffected (verified).

Validated locally end-to-end: assembleRelease BUILD SUCCESSFUL, 117MB APK across
all 4 ABIs with librnwhisper.so, signed (CN=Wisp, O=briggen.dev).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 23:59:08 +02:00

15 lines
576 B
JavaScript

// 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;