Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading