Sasha 9be942fc23
feat: add react-native polyfills (#1915)
* make publishing from any branch

* feat: add @waku/pollyills package

* add package tracking

* up lock

* add peer dependencies and other improvements

* up lock

* up lock

* use es module syntax, remove usage of rollup

* rename to react-native-polyfills

* up command

* up lock
2024-04-02 13:53:06 +02:00

16 lines
516 B
TypeScript

import path, { dirname } from "path";
import { fileURLToPath } from "url";
import type { MetroConfig } from "expo/metro-config";
const __dirname = dirname(fileURLToPath(import.meta.url));
type Writeable<T> = { -readonly [P in keyof T]: Writeable<T[P]> };
export function setupWakuMetroConfig(config: Writeable<MetroConfig>): void {
config.resolver.unstable_enablePackageExports = true;
config.resolver.extraNodeModules = {
url: path.resolve(__dirname, "node_modules", "react-native-url-polyfill")
};
}