Skip to content

Commit 2122ab9

Browse files
committed
chore: fix example metro bundler using correct RNWC version
1 parent d6d4faf commit 2122ab9

File tree

5 files changed

+16
-9
lines changed

5 files changed

+16
-9
lines changed

package/example/AppExampleFabric/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"scripts": {
66
"android": "react-native run-android",
77
"ios": "react-native run-ios",
8-
"start": "react-native start",
8+
"start": "cd ../Shared && yarn start",
99
"typescript": "tsc --noEmit",
1010
"pods": "cd ios && bundle install && RCT_NEW_ARCH_ENABLED=1 bundle exec pod install",
1111
"build:android": "cd android && ./gradlew assembleDebug --no-daemon --console=plain -PreactNativeArchitectures=arm64-v8a",

package/example/AppExamplePaper/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"scripts": {
66
"android": "react-native run-android",
77
"ios": "react-native run-ios",
8-
"start": "react-native start",
8+
"start": "cd ../Shared && IS_NEW_ARCH=false yarn start",
99
"typescript": "tsc --noEmit",
1010
"pods": "cd ios && bundle install && RCT_NEW_ARCH_ENABLED=0 bundle exec pod install",
1111
"build:android": "cd android && ./gradlew assembleDebug --no-daemon --console=plain -PreactNativeArchitectures=arm64-v8a",
@@ -15,7 +15,6 @@
1515
"dependencies": {
1616
"@react-navigation/native": "^6.1.17",
1717
"@react-navigation/native-stack": "^6.9.26",
18-
"react": "18.2.0",
1918
"react-native": "0.74.1",
2019
"react-native-gesture-handler": "^2.16.2",
2120
"react-native-reanimated": "^3.11.0",

package/example/Shared/babel.config.js

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,24 @@
11
const path = require('path')
22
const pak = require('../../package.json')
33

4+
const aliasMap = {
5+
[pak.name]: path.join(__dirname, '..', '..', pak.source),
6+
[pak.name + '-test']: path.join(__dirname, '..', '..', pak.test),
7+
'~/assets': path.join(__dirname, 'assets'),
8+
}
9+
10+
if (process.env.IS_NEW_ARCH === 'false') {
11+
aliasMap['react-native-worklets-core'] = path.join(__dirname, '..', 'AppExamplePaper', 'node_modules', 'react-native-worklets-core')
12+
}
13+
414
module.exports = {
515
presets: ['module:@react-native/babel-preset'],
616
plugins: [
717
[
818
'module-resolver',
919
{
1020
extensions: ['.tsx', '.ts', '.js', '.json'],
11-
alias: {
12-
[pak.name]: path.join(__dirname, '..', '..', pak.source),
13-
[pak.name + '-test']: path.join(__dirname, '..', '..', pak.test),
14-
'~/assets': path.join(__dirname, 'assets'),
15-
},
21+
alias: aliasMap,
1622
},
1723
],
1824
['react-native-reanimated/plugin', { processNestedWorklets: true }],

package/example/Shared/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ import App from './src/App'
33
import { name as appName } from './app.json'
44
import { StrictMode } from 'react'
55

6+
import { version } from 'react-native-worklets-core/package.json'
7+
console.log(`Using react-native-worklets-core@${version}`)
8+
69
// Run filament tests
710
import { runTests } from 'react-native-filament-test'
811
runTests()

package/yarn.lock

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10091,7 +10091,6 @@ __metadata:
1009110091
"@react-navigation/native": ^6.1.17
1009210092
"@react-navigation/native-stack": ^6.9.26
1009310093
babel-plugin-module-resolver: ^5.0.0
10094-
react: 18.2.0
1009510094
react-native: 0.74.1
1009610095
react-native-gesture-handler: ^2.16.2
1009710096
react-native-reanimated: ^3.11.0

0 commit comments

Comments
 (0)