File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,35 @@ module.exports = function (api) {
7171};
7272```
7373
74+ ## Metro config (optional)
75+
76+ When using a bare React Native app without a framework like Expo, the ` @powersync/react-native ` package does not work well with inline requires.
77+
78+ If you see the following error message
79+
80+
81+ ``` bash
82+ Super expression must either be null or a function
83+ ```
84+
85+ then you will need to add this to your ` metro.config.js ` :
86+
87+ ``` js
88+ const config = {
89+ transformer: {
90+ getTransformOptions: async () => ({
91+ transform: {
92+ inlineRequires: {
93+ blockList: {
94+ [require .resolve (" @powersync/react-native" )]: true ,
95+ },
96+ },
97+ },
98+ })
99+ }
100+ };
101+ ```
102+
74103# Native Projects
75104
76105This package uses native libraries. Create native Android and iOS projects (if not created already) by running:
You can’t perform that action at this time.
0 commit comments