Skip to content

Commit bc3de4f

Browse files
authored
copy-assets update for RN Web (#84)
* copy-assets update for RN Web * Output example
1 parent ed6795f commit bc3de4f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

client-sdk-references/react-native-and-expo/react-native-web-support.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@ For React Native for Web, workers need to be configured when instantiating `Powe
3030

3131
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`.
3232

33-
You can run the following bash command to automate the copying process. It will create copy the contents to `/public/@powersync`.
33+
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).
3434

3535
```bash
36-
mkdir -p public/@powersync && cp -r node_modules/@powersync/web/dist/* public/@powersync/
36+
npx powersync-web copy-assets # Places assets into public/@powersync by default. Override with `--output path/from_current_working_dir`.
37+
# or pnpm powersync-web copy-assets
3738
```
3839

3940
### 3\. Instantiate Web Workers

0 commit comments

Comments
 (0)