You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`react-native-streamdown` requires special options to be added to the Worklets Babel plugin config in `babel.config.js`, namely `bundleMode: true` and `workletizableModules: ['remend']`. Your final config could look like this:
50
+
`react-native-streamdown` requires special options to be added to the Worklets Babel plugin config in `babel.config.js`, namely `bundleMode: true` and `importForwarding.moduleNames: ['remend']`. Your final config could look like this:
51
51
52
52
#### Expo
53
53
@@ -63,7 +63,9 @@ module.exports = function (api) {
63
63
{
64
64
bundleMode:true,
65
65
// other options...
66
-
workletizableModules: ['remend'], // add this line
66
+
importForwarding: {
67
+
moduleNames: ['remend'], // add this line
68
+
},
67
69
},
68
70
],
69
71
],
@@ -77,11 +79,15 @@ module.exports = function (api) {
77
79
constworkletsPluginOptions= {
78
80
bundleMode:true,
79
81
// other options...
80
-
workletizableModules: ['remend'], // add this line
82
+
importForwarding: {
83
+
moduleNames: ['remend'], // add this line
84
+
},
81
85
};
82
86
```
83
87
84
-
`workletizableModules: ['remend']` tells the Babel plugin to pre-bundle `remend` for the worklet runtime so it can be called off the JS thread.
88
+
`importForwarding.moduleNames: ['remend']` tells the Babel plugin to forward the `remend` import into the generated worklet so it can be called off the JS thread.
89
+
90
+
For `react-native-worklets` versions below 0.10, use `workletizableModules: ['remend']` instead.
85
91
86
92
### 2. `metro.config.js` — configure Metro for monorepos
0 commit comments