Skip to content
Merged
Show file tree
Hide file tree
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
14 changes: 9 additions & 5 deletions src/content/docs/workers/vite-plugin/reference/api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,15 @@ It accepts an optional `PluginConfig` parameter.
All requests are routed through your entry Worker.
During the build, each Worker is output to a separate subdirectory of `dist`.

:::note
When running `wrangler deploy`, only your main (entry) Worker will be deployed.
If using multiple Workers, each auxiliary Worker must be deployed individually.
You can inspect the `dist` directory and then run `wrangler deploy -c dist/<auxiliary-worker>/wrangler.json` for each.
:::
:::note
Auxiliary Workers are not currently supported when using [React Router](https://reactrouter.com/) as a framework.
:::

:::note
When running `wrangler deploy`, only your main (entry) Worker will be deployed.
If using multiple Workers, each auxiliary Worker must be deployed individually.
You can inspect the `dist` directory and then run `wrangler deploy -c dist/<auxiliary-worker>/wrangler.json` for each.
:::

## `interface AuxiliaryWorkerConfig`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,13 @@ assets = { not_found_handling = "single-page-application" }

</WranglerConfig>

{/* Add docs for _headers and _redirects */}
## Headers and redirects

Custom [headers](/workers/static-assets/headers/) and [redirects](/workers/static-assets/redirects/) are supported at build, preview and deploy time by adding `_headers` and `_redirects` files to your [`public` directory](https://vite.dev/guide/assets#the-public-directory).
The paths in these files should reflect the structure of your client build output.
For example, generated assets are typically located in an [assets subdirectory](https://vite.dev/config/build-options#build-assetsdir).

<br />

:::note
The Cloudflare Vite plugin does not support [run_worker_first](/workers/static-assets/binding/#run_worker_first).
Expand Down