This repository was archived by the owner on Feb 15, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathmetro.config.js
More file actions
62 lines (59 loc) · 1.46 KB
/
metro.config.js
File metadata and controls
62 lines (59 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
const path = require('node:path');
const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config');
const { withModuleFederation } = require('@module-federation/metro');
/**
* Metro configuration
* https://reactnative.dev/docs/metro
*
* @type {import('@react-native/metro-config').MetroConfig}
*/
const config = {
resolver: { useWatchman: false },
watchFolders: [
path.resolve(__dirname, '../../node_modules'),
path.resolve(__dirname, '../../packages/core'),
],
};
module.exports = withModuleFederation(
mergeConfig(getDefaultConfig(__dirname), config),
{
name: 'MFExampleNestedMini',
filename: 'nestedMini.bundle',
exposes: {
'./nestedMiniInfo': './src/nested-mini-info.tsx',
},
remotes: {
mini: 'mini@http://localhost:8082/mf-manifest.json',
},
shared: {
react: {
singleton: true,
eager: false,
requiredVersion: '19.1.0',
version: '19.1.0',
import: false,
},
'react-native': {
singleton: true,
eager: false,
requiredVersion: '0.80.0',
version: '0.80.0',
import: false,
},
lodash: {
singleton: false,
eager: false,
requiredVersion: '4.16.6',
version: '4.16.6',
},
},
shareStrategy: 'version-first',
},
{
flags: {
unstable_patchHMRClient: true,
unstable_patchInitializeCore: true,
unstable_patchRuntimeRequire: true,
},
}
);