Skip to content

Commit 6930b9d

Browse files
chore: Fix assets in example app (#8514)
## Summary Apparently after metro `0.83.2` we need to explicitly set `apps` in `watchFolders` - `root` is no longer enough, and the fix for Android is redundant. ## Test plan Please just run `Animated Filter` example on android and ios - if you can see the balloons we are home
1 parent 16cfc6e commit 6930b9d

File tree

3 files changed

+7
-28
lines changed

3 files changed

+7
-28
lines changed

apps/common-app/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@
6464
"madge": "8.0.0",
6565
"prettier": "3.6.2",
6666
"react-native": "0.82.0",
67-
"react-native-monorepo-tools": "1.2.1",
6867
"react-test-renderer": "19.1.1",
6968
"typescript": "5.8.3",
7069
"typescript-eslint": "8.46.0"

apps/fabric-example/metro.config.js

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,23 @@ const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config');
22
const {
33
wrapWithReanimatedMetroConfig,
44
} = require('react-native-reanimated/metro-config');
5-
const {
6-
getMetroAndroidAssetsResolutionFix,
7-
// @ts-ignore react-native-monorepo-tools doesn't have types.
8-
} = require('react-native-monorepo-tools');
9-
10-
const androidAssetsResolutionFix = getMetroAndroidAssetsResolutionFix();
115

126
const path = require('path');
137

148
const root = path.resolve(__dirname, '../..');
9+
const appsPath = path.resolve(root, 'apps')
1510

1611
/**
1712
* Metro configuration https://reactnative.dev/docs/metro
1813
*
1914
* @type {import('@react-native/metro-config').MetroConfig}
2015
*/
2116
let config = {
22-
watchFolders: [root],
23-
transformer: {
24-
publicPath: androidAssetsResolutionFix.publicPath,
25-
},
26-
server: {
27-
enhanceMiddleware: (middleware) => {
28-
return androidAssetsResolutionFix.applyMiddleware(middleware);
29-
},
30-
},
17+
watchFolders: [
18+
root,
19+
appsPath
20+
],
21+
3122
};
3223

3324
config = mergeConfig(getDefaultConfig(__dirname), config);

yarn.lock

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12459,7 +12459,6 @@ __metadata:
1245912459
react-dom: "npm:19.1.1"
1246012460
react-native: "npm:0.82.0"
1246112461
react-native-gesture-handler: "npm:2.28.0"
12462-
react-native-monorepo-tools: "npm:1.2.1"
1246312462
react-native-pager-view: "npm:7.0.0"
1246412463
react-native-reanimated: "workspace:*"
1246512464
react-native-safe-area-context: "npm:5.6.1"
@@ -16605,7 +16604,7 @@ __metadata:
1660516604
languageName: node
1660616605
linkType: hard
1660716606

16608-
"glob@npm:^7.1.1, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.1.6, glob@npm:^7.1.7, glob@npm:^7.2.0, glob@npm:^7.2.3":
16607+
"glob@npm:^7.1.1, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.1.6, glob@npm:^7.2.0, glob@npm:^7.2.3":
1660916608
version: 7.2.3
1661016609
resolution: "glob@npm:7.2.3"
1661116610
dependencies:
@@ -26149,16 +26148,6 @@ __metadata:
2614926148
languageName: node
2615026149
linkType: hard
2615126150

26152-
"react-native-monorepo-tools@npm:1.2.1":
26153-
version: 1.2.1
26154-
resolution: "react-native-monorepo-tools@npm:1.2.1"
26155-
dependencies:
26156-
find-root: "npm:^1.1.0"
26157-
glob: "npm:^7.1.7"
26158-
checksum: 10/356fc34b41c21a4e6db64e539dd604c3d01d8c3548988affe13c9a83893ad162d48d45e3333d553023177e2523e147390820594aaba771d10575d77ccdde544d
26159-
languageName: node
26160-
linkType: hard
26161-
2616226151
"react-native-pager-view@npm:7.0.0":
2616326152
version: 7.0.0
2616426153
resolution: "react-native-pager-view@npm:7.0.0"

0 commit comments

Comments
 (0)