UPDATE
I wasn’t able to resolve the issue with Metro.runBuild, but I achieved my goal using the options provided by the npx expo export command:
npx expo export --output-dir "my-dir" --platform web --source-maps