diff --git a/client-sdk-references/react-native-and-expo/react-native-web-support.mdx b/client-sdk-references/react-native-and-expo/react-native-web-support.mdx index dfe31fd8..58ac729d 100644 --- a/client-sdk-references/react-native-and-expo/react-native-web-support.mdx +++ b/client-sdk-references/react-native-and-expo/react-native-web-support.mdx @@ -30,10 +30,11 @@ For React Native for Web, workers need to be configured when instantiating `Powe To do this, copy the contents of `node_modules/@powersync/web/dist` to the root of your project (typically in the `public `directory). To make it easier to manage these files in the `public` directory, it is recommended to place the contents in a nested directory like `@powersync`. -You can run the following bash command to automate the copying process. It will create copy the contents to `/public/@powersync`. +The [`@powersync/web`](https://github.com/powersync-ja/powersync-js/tree/main/packages/web) package includes a CLI utility which can copy the required assets to the `public` directory (configurable with the `--output` option). ```bash -mkdir -p public/@powersync && cp -r node_modules/@powersync/web/dist/* public/@powersync/ +npx powersync-web copy-assets # Places assets into public/@powersync by default. Override with `--output path/from_current_working_dir`. +# or pnpm powersync-web copy-assets ``` ### 3\. Instantiate Web Workers