Skip to content

Commit 7f09080

Browse files
committed
feat: implment sample app example usage
1 parent acc495c commit 7f09080

File tree

3 files changed

+404
-21
lines changed

3 files changed

+404
-21
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,9 @@ android/generated
8484

8585
# React Native Nitro Modules
8686
nitrogen/
87+
88+
89+
90+
91+
example/android
92+
example/ios

example/metro.config.js

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
const path = require('path');
22
const { getDefaultConfig } = require('@expo/metro-config');
3-
const { withMetroConfig } = require('react-native-monorepo-config');
43

54
const root = path.resolve(__dirname, '..');
65

7-
/**
8-
* Metro configuration
9-
* https://facebook.github.io/metro/docs/configuration
10-
*
11-
* @type {import('metro-config').MetroConfig}
12-
*/
13-
const config = withMetroConfig(getDefaultConfig(__dirname), {
14-
root,
15-
dirname: __dirname,
16-
});
6+
module.exports = (async () => {
7+
const { withMetroConfig } = await import('react-native-monorepo-config');
178

18-
config.resolver.unstable_enablePackageExports = true;
9+
/**
10+
* Metro configuration
11+
* https://facebook.github.io/metro/docs/configuration
12+
*
13+
* @type {import('metro-config').MetroConfig}
14+
*/
15+
const config = withMetroConfig(getDefaultConfig(__dirname), {
16+
root,
17+
dirname: __dirname,
18+
});
1919

20-
module.exports = config;
20+
config.resolver.unstable_enablePackageExports = true;
21+
22+
return config;
23+
})();

0 commit comments

Comments
 (0)